diff --git a/CHANGELOG.md b/CHANGELOG.md
index 27065c66..ce9676d5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,11 @@
+## 6.6.0
+* Updated Native `Android` and `iOS` SDKs:
+ * Android Native SDK Update 5.4.+ - [Android Version History](https://github.com/BranchMetrics/android-branch-deep-linking-attribution/releases)
+ * iOS Native SDK Update 2.1.0 - [iOS Version History](https://github.com/BranchMetrics/ios-branch-deep-linking-attribution/releases)
+
+* New Methods:
+ - `addSnapPartnerParameter` - See [documentation](https://help.branch.io/using-branch/docs/snap) on partner parameters for details.
+
## 6.5.0
* Updated Native `iOS` SDK:
* iOS Native SDK Update 2.0.0 - [iOS Version History](https://github.com/BranchMetrics/ios-branch-deep-linking-attribution/releases)
diff --git a/README.md b/README.md
index c70fffa8..adf47211 100644
--- a/README.md
+++ b/README.md
@@ -8,8 +8,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.2.+ [Android Version History](https://github.com/BranchMetrics/android-branch-deep-linking-attribution/releases)
-* iOS - Branch SDK Version >= 2.0.+ [iOS Version History](https://github.com/BranchMetrics/ios-branch-deep-linking-attribution/releases)
+* Android - Branch SDK Version >= 5.4.+ [Android Version History](https://github.com/BranchMetrics/android-branch-deep-linking-attribution/releases)
+* iOS - Branch SDK Version >= 2.1.+ [iOS Version History](https://github.com/BranchMetrics/ios-branch-deep-linking-attribution/releases)
Implemented functions in plugin:
@@ -429,8 +429,8 @@ The `BranchEvent` interface provides an interface to add contents represented by
Analytics about your app's BranchEvents can be found on the Branch dashboard, and BranchEvents also provide tight integration with many third party analytics providers.
```dart
-BranchEvent eventStandart = BranchEvent.standardEvent(BranchStandardEvent.ADD_TO_CART);
-FlutterBranchSdk.trackContent(buo: [buo], branchEvent: eventStandart);
+BranchEvent eventStandard = BranchEvent.standardEvent(BranchStandardEvent.ADD_TO_CART);
+FlutterBranchSdk.trackContent(buo: [buo], branchEvent: eventStandard);
```
You can use your own custom event names too:
@@ -441,21 +441,19 @@ FlutterBranchSdk.trackContent(buo: [buo], branchEvent: eventCustom);
Extra event specific data can be tracked with the event as well:
```dart
- eventStandart.transactionID = '12344555';
- eventStandart.currency = BranchCurrencyType.BRL;
- eventStandart.revenue = 1.5;
- eventStandart.shipping = 10.2;
- eventStandart.tax = 12.3;
- eventStandart.coupon = 'test_coupon';
- eventStandart.affiliation = 'test_affiliation';
- eventStandart.eventDescription = 'Event_description';
- eventStandart.searchQuery = 'item 123';
- eventStandart.adType = BranchEventAdType.BANNER;
- eventStandart.addCustomData(
- 'Custom_Event_Property_Key1', 'Custom_Event_Property_val1');
- eventStandart.addCustomData(
- 'Custom_Event_Property_Key2', 'Custom_Event_Property_val2');
- FlutterBranchSdk.trackContent(buo: [buo], branchEvent: eventStandart);
+ eventStandard.transactionID = '12344555';
+ eventStandard.currency = BranchCurrencyType.BRL;
+ eventStandard.revenue = 1.5;
+ eventStandard.shipping = 10.2;
+ eventStandard.tax = 12.3;
+ eventStandard.coupon = 'test_coupon';
+ eventStandard.affiliation = 'test_affiliation';
+ eventStandard.eventDescription = 'Event_description';
+ eventStandard.searchQuery = 'item 123';
+ eventStandard.adType = BranchEventAdType.BANNER;
+ eventStandard.addCustomData('Custom_Event_Property_Key1', 'Custom_Event_Property_val1');
+ eventStandard.addCustomData('Custom_Event_Property_Key2', 'Custom_Event_Property_val2');
+ FlutterBranchSdk.trackContent(buo: [buo], branchEvent: eventStandard);
```
`trackContent` accepts a list of Branch Universal Object.
diff --git a/android/build.gradle b/android/build.gradle
index dad11ea6..d45c87ff 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -35,7 +35,7 @@ android {
}
dependencies {
- implementation 'io.branch.sdk.android:library:5.2.+'
+ implementation 'io.branch.sdk.android:library:5.4.+'
implementation 'com.google.firebase:firebase-appindexing:19.0.0'
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1+'
implementation 'androidx.browser:browser:1.4.0'
diff --git a/android/src/main/java/br/com/rsmarques/flutter_branch_sdk/FlutterBranchSdkPlugin.java b/android/src/main/java/br/com/rsmarques/flutter_branch_sdk/FlutterBranchSdkPlugin.java
index 6614336d..ad60294f 100644
--- a/android/src/main/java/br/com/rsmarques/flutter_branch_sdk/FlutterBranchSdkPlugin.java
+++ b/android/src/main/java/br/com/rsmarques/flutter_branch_sdk/FlutterBranchSdkPlugin.java
@@ -315,6 +315,10 @@ public void onMethodCall(@NonNull MethodCall call, @NonNull Result rawResult) {
case "setPreinstallPartner" :
setPreinstallPartner(call);
break;
+ case "addSnapPartnerParameter" :
+ addSnapPartnerParameter(call);
+ break;
+
default:
result.notImplemented();
break;
@@ -844,6 +848,21 @@ public void run() {
}
});
}
+ private void addSnapPartnerParameter(MethodCall call) {
+ LogUtils.debug(DEBUG_NAME, "addSnapPartnerParameter call");
+ if (!(call.arguments instanceof Map)) {
+ throw new IllegalArgumentException("Map argument expected");
+ }
+ final String key = call.argument("key");
+ final String value = call.argument("value");
+
+ new Handler(Looper.getMainLooper()).post(new Runnable() {
+ @Override
+ public void run() {
+ Branch.getAutoInstance(context).addSnapPartnerParameterWithName(key, value);
+ }
+ });
+ }
}
diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock
index 4f8c1534..e978fe1a 100644
--- a/example/ios/Podfile.lock
+++ b/example/ios/Podfile.lock
@@ -1,8 +1,8 @@
PODS:
- - BranchSDK (2.0.0)
+ - BranchSDK (2.1.0)
- Flutter (1.0.0)
- flutter_branch_sdk (6.4.0):
- - BranchSDK (~> 2.0.0)
+ - BranchSDK (~> 2.1.0)
- Flutter
DEPENDENCIES:
@@ -20,9 +20,9 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_branch_sdk/ios"
SPEC CHECKSUMS:
- BranchSDK: dbecf9d1da931c2cf57393b233347b3587d11acb
+ BranchSDK: ce28650272c658fcdb66675769e670ef83845d17
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
- flutter_branch_sdk: 193591ad0c4938b925c9068aff19584236c3cf8f
+ flutter_branch_sdk: cc0393df011973fe6ab0380bc54bce1a3726e8a3
PODFILE CHECKSUM: 7368163408c647b7eb699d0d788ba6718e18fb8d
diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj
index 194eb1be..8575af35 100644
--- a/example/ios/Runner.xcodeproj/project.pbxproj
+++ b/example/ios/Runner.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 51;
+ objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
@@ -203,6 +203,7 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
@@ -239,6 +240,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist
index f986b2c3..6b1d6627 100644
--- a/example/ios/Runner/Info.plist
+++ b/example/ios/Runner/Info.plist
@@ -68,5 +68,7 @@
branch_key
key_test_ipQTteg11ENANDeCzSXgqdgfuycWoXYH
+ UIApplicationSupportsIndirectInputEvents
+
diff --git a/example/lib/main.dart b/example/lib/main.dart
index 44796dff..ac285077 100644
--- a/example/lib/main.dart
+++ b/example/lib/main.dart
@@ -12,9 +12,17 @@ void main() {
WidgetsFlutterBinding.ensureInitialized();
//FlutterBranchSdk.setPreinstallCampaign('My Campaign Name');
//FlutterBranchSdk.setPreinstallPartner('Branch \$3p Parameter Value');
- //FlutterBranchSdk.addFacebookPartnerParameter('em', '11234e56af071e9c79927651156bd7a10bca8ac34672aba121056e2698ee7088');
+
+ //FlutterBranchSdk.addFacebookPartnerParameter(
+ // key: 'em',
+ // value: '11234e56af071e9c79927651156bd7a10bca8ac34672aba121056e2698ee7088');
//FlutterBranchSdk.clearPartnerParameters();
+ //FlutterBranchSdk.addSnapPartnerParameter(
+ // key: 'hashed_email_address',
+ // value:
+ // '11234e56af071e9c79927651156bd7a10bca8ac34672aba121056e2698ee7088');
+
runApp(const MyApp());
}
@@ -45,7 +53,7 @@ class _HomePageState extends State {
BranchContentMetaData metadata = BranchContentMetaData();
BranchUniversalObject? buo;
BranchLinkProperties lp = BranchLinkProperties();
- BranchEvent? eventStandart;
+ BranchEvent? eventStandard;
BranchEvent? eventCustom;
StreamSubscription