Skip to content

Commit

Permalink
Merge pull request #321 from RodrigoSMarques/dev
Browse files Browse the repository at this point in the history
Release 8.0.0
  • Loading branch information
RodrigoSMarques committed May 17, 2024
2 parents 3dbada4 + 123268d commit 4a9650e
Show file tree
Hide file tree
Showing 32 changed files with 1,117 additions and 1,124 deletions.
38 changes: 31 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,55 @@
## 8.0.0
### ⚠️ BREAKING CHANGE
This is a major release which contains breaking API changes.
#### ⚠️ SDK Initialization Changed
* `useTestKey` parameter is no longer supported at `FlutterBranchSdk.init()`.

Check the instructions in `README.MD` on how to activate the `key_test_`.

### 🐛 Bug Fixes
* Fix issue #283: Android app not getting correct deeplink from Branch when app is opened
* Fix issue #308: Android non branch deep link sometimes not available
* Fix issue #309: Completion of await FlutterBranchSdk.init() doesn't mean native iOS plugin is ready?
* Fix issue #311: Flutter SDK init falls into loop when race condition happens during the initialization.
* Fix issue #314: Issue with Branch.io Integration on Apple 14 pro
* Fix issue #316: Not getting link after fresh install


### 🔧 Native SDK Updates

* Updated included iOS SDK to 3.4.3 - [iOS Version History](https://github.com/BranchMetrics/ios-branch-deep-linking-attribution/releases)

* Updated included Branch Android SDK to 5.12.0 - [Android Version History](https://github.com/BranchMetrics/android-branch-deep-linking-attribution/releases)


## 7.3.0
### Native SDK Updates
### 🔧 Native SDK Updates

* Updated included Branch Android SDK to 5.11.0 - [Android Version History](https://github.com/BranchMetrics/android-branch-deep-linking-attribution/releases)
* Updated included Branch iOS SDK to 3.4.1 - [iOS Version History](https://github.com/BranchMetrics/ios-branch-deep-linking-attribution/releases)

## 7.2.0
### Features
### 🎉 Features
* `showShareSheet` method will now display the native Android share sheet.
* Documentation review

### Dependencies Update
### 🔧 Dependencies Update
* Updated dependency `js`. From version 0.6.7 to 7.0.0

### Native SDK Updates
### 🔧 Native SDK Updates
* Updated included Branch Android SDK to 5.10.1 - [Android Version History](https://github.com/BranchMetrics/android-branch-deep-linking-attribution/releases)

## 7.1.0
### Features
### 🎉 Features
* New Methods:
- `setDMAParamsForEEA` - In response to the European Union's enactment of the Digital Markets Act (DMA), this new method help pass consent information from your user to Google.
See [documentation](https://github.com/RodrigoSMarques/flutter_branch_sdk?tab=readme-ov-file#user-data) for details.

### Issues
### 🐛 Issues

* Fix issue #297: Allow Call setRequestMetadata after FlutterBranchSdk.init() method

### Native SDK Updates
### 🔧 Native SDK Updates

* Updated included Branch Android SDK to 5.9.0 - [Android Version History](https://github.com/BranchMetrics/android-branch-deep-linking-attribution/releases)
* Updated included Branch iOS SDK to 3.3.0 - [iOS Version History](https://github.com/BranchMetrics/ios-branch-deep-linking-attribution/releases)
Expand Down
43 changes: 38 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Branch.io helps mobile apps grow with deep links that power referral systems, sh

Supports Android, iOS and Web.

* Android - Branch SDK Version >= 5.10.1 [Android Version History](https://github.com/BranchMetrics/android-branch-deep-linking-attribution/releases)
* iOS - Branch SDK Version >= 3.3.0 [iOS Version History](https://github.com/BranchMetrics/ios-branch-deep-linking-attribution/releases)
* Android - Branch SDK Version >= 5.12.0 [Android Version History](https://github.com/BranchMetrics/android-branch-deep-linking-attribution/releases)
* iOS - Branch SDK Version >= 3.4.3 [iOS Version History](https://github.com/BranchMetrics/ios-branch-deep-linking-attribution/releases)

Implemented functions in plugin:

Expand Down Expand Up @@ -153,13 +153,11 @@ To initialize Branch:
```dart
import 'package:flutter_branch_sdk/flutter_branch_sdk.dart';
await FlutterBranchSdk.init(
useTestKey: false, enableLogging: false, disableTracking: false);
await FlutterBranchSdk.init(enableLogging: false, disableTracking: false);
```

The optional parameters are:

- *useTestKey* : Sets `true` to use the test `key_test_....` .Default value: false
- *enableLogging* : Sets `true` turn on debug logging. Default value: false
- *disableTracking*: Sets `true` to disable tracking in Branch SDK for GDPR compliant on start. Default value: false

Expand Down Expand Up @@ -636,6 +634,41 @@ adUserDataUsageConsent | Boolean | Whether end user has granted or denied consen

When parameters are successfully set using `setDMAParamsForEEA`, they will be sent along with every future request to the following Branch endpoint.

# Configuring the project to use Branch Test Key
## Android

Add or update the code below in `AndroidManifest.xml`:

```xml
<!-- Set to `true` to use `BranchKey.test` -->
<meta-data
android:name="io.branch.sdk.TestMode" android:value="true" />
```

***Note***: Remember to set the value to `false` before releasing to production.

### iOS

1) Create an empty file called `branch.json`.

2) Paste the content below into the file or make download [here](https://github.com/RodrigoSMarques/flutter_branch_sdk/blob/dev/assets/branch.json):

```json
{
"useTestInstance": true
}

```

3) Add the file `branch.json` to your project using Xcode. Within your project, navigate to File Add Files.

4) Select the `branch.json` file and make sure every target in your project that uses Branch is selected.

![branch.json](https://github.com/RodrigoSMarques/flutter_branch_sdk/blob/dev/assets/branch_json_add.png)

![branch.json](https://github.com/RodrigoSMarques/flutter_branch_sdk/blob/dev/assets/branch_json_project.png)

**Note*:* Remember to set the value to `false` before releasing to production.

# Getting Started
See the `example` directory for a complete sample app using Branch SDK.
Expand Down
11 changes: 6 additions & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,25 @@ android {
if (project.android.hasProperty("namespace")) {
namespace 'br.com.rsmarques.flutter_branch_sdk'
}

buildFeatures {
buildConfig = true
}

defaultConfig {
minSdkVersion 21
compileSdk 34
buildConfigField("String", "FBRANCH_VERSION", "\"${getPackageVersion()}\"")
}

buildFeatures {
buildConfig = true
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
implementation 'io.branch.sdk.android:library:5.11.+'
implementation 'io.branch.sdk.android:library:5.12.+'
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
implementation 'androidx.lifecycle:lifecycle-runtime:2.7.0'
implementation 'androidx.browser:browser:1.8.0'
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStorePath=wrapper/dists
1 change: 1 addition & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
rootProject.name = 'flutter_branch_sdk'
android.defaults.buildfeatures.buildconfig=true
3 changes: 3 additions & 0 deletions android/src/main/assets/branch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deferInitForPluginRuntime": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package br.com.rsmarques.flutter_branch_sdk;

import android.content.Context;

import io.branch.referral.Branch;

public class FlutterBranchSdkInit {
private static final String DEBUG_NAME = "FlutterBranchSDK";
private static final String PLUGIN_NAME = "Flutter";
private static final String PLUGIN_VERSION = "8.0.0";

public static void init(Context context) {
LogUtils.debug(DEBUG_NAME, "SDK Init");
Branch.expectDelayedSessionInitialization(true);
Branch.registerPlugin(PLUGIN_NAME, br.com.rsmarques.flutter_branch_sdk.BuildConfig.FBRANCH_VERSION);
Branch.getAutoInstance(context);
}
}

1 comment on commit 4a9650e

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.