Skip to content

Commit

Permalink
Merge pull request #298 from RodrigoSMarques/dev
Browse files Browse the repository at this point in the history
Release 7.1.0
  • Loading branch information
RodrigoSMarques authored Feb 29, 2024
2 parents 01e7209 + 4443175 commit 178514f
Show file tree
Hide file tree
Showing 19 changed files with 427 additions and 237 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## 7.1.0
### 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

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

### 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)

## 7.0.4
### Issues

Expand Down
29 changes: 25 additions & 4 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.8.+ [Android Version History](https://github.com/BranchMetrics/android-branch-deep-linking-attribution/releases)
* iOS - Branch SDK Version >= 3.0.+ [iOS Version History](https://github.com/BranchMetrics/ios-branch-deep-linking-attribution/releases)
* Android - Branch SDK Version >= 5.9.0 [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)

Implemented functions in plugin:

Expand Down Expand Up @@ -74,7 +74,9 @@ You need add Branch Javascript in your `web\index.html` at the top of your `<bod

```javascript
<script>
(function(b,r,a,n,c,h,_,s,d,k){if(!b[n]||!b[n]._q){for(;s<_.length;)c(h,_[s++]);d=r.createElement(a);d.async=1;d.src="https://cdn.branch.io/branch-latest.min.js";k=r.getElementsByTagName(a)[0];k.parentNode.insertBefore(d,k);b[n]=h}})(window,document,"script","branch",function(b,r){b[r]=function(){b._q.push([r,arguments])}},{_q:[],_v:1},"addListener applyCode autoAppIndex banner closeBanner closeJourney creditHistory credits data deepview deepviewCta first getCode init link logout redeem referrals removeListener sendSMS setBranchViewData setIdentity track validateCode trackCommerceEvent logEvent disableTracking".split(" "), 0);
// load Branch
(function(b,r,a,n,c,h,_,s,d,k){if(!b[n]||!b[n]._q){for(;s<_.length;)c(h,_[s++]);d=r.createElement(a);d.async=1;d.src="https://cdn.branch.io/branch-latest.min.js";k=r.getElementsByTagName(a)[0];k.parentNode.insertBefore(d,k);b[n]=h}})(window,document,"script","branch",function(b,r){b[r]=function(){b._q.push([r,arguments])}},{_q:[],_v:1},"addListener banner closeBanner closeJourney data deepview deepviewCta first init link logout removeListener setBranchViewData setIdentity track trackCommerceEvent logEvent disableTracking getBrowserFingerprintId crossPlatformIds lastAttributedTouchData setAPIResponseCallback qrCode setRequestMetaData setAPIUrl getAPIUrl setDMAParamsForEEA".split(" "), 0);
// init Branch
branch.init('key_live_or_test_YOUR_KEY_GOES_HERE');
</script>
```
Expand Down Expand Up @@ -118,7 +120,9 @@ Full example `index.html`:
</head>
<body>
<script>
(function(b,r,a,n,c,h,_,s,d,k){if(!b[n]||!b[n]._q){for(;s<_.length;)c(h,_[s++]);d=r.createElement(a);d.async=1;d.src="https://cdn.branch.io/branch-latest.min.js";k=r.getElementsByTagName(a)[0];k.parentNode.insertBefore(d,k);b[n]=h}})(window,document,"script","branch",function(b,r){b[r]=function(){b._q.push([r,arguments])}},{_q:[],_v:1},"addListener applyCode autoAppIndex banner closeBanner closeJourney creditHistory credits data deepview deepviewCta first getCode init link logout redeem referrals removeListener sendSMS setBranchViewData setIdentity track validateCode trackCommerceEvent logEvent disableTracking".split(" "), 0);
// load Branch
(function(b,r,a,n,c,h,_,s,d,k){if(!b[n]||!b[n]._q){for(;s<_.length;)c(h,_[s++]);d=r.createElement(a);d.async=1;d.src="https://cdn.branch.io/branch-latest.min.js";k=r.getElementsByTagName(a)[0];k.parentNode.insertBefore(d,k);b[n]=h}})(window,document,"script","branch",function(b,r){b[r]=function(){b._q.push([r,arguments])}},{_q:[],_v:1},"addListener banner closeBanner closeJourney data deepview deepviewCta first init link logout removeListener setBranchViewData setIdentity track trackCommerceEvent logEvent disableTracking getBrowserFingerprintId crossPlatformIds lastAttributedTouchData setAPIResponseCallback qrCode setRequestMetaData setAPIUrl getAPIUrl setDMAParamsForEEA".split(" "), 0);
// init Branch
branch.init('key_live_or_test_YOUR_KEY_GOES_HERE');
</script>
<!-- This script installs service_worker.js to provide PWA functionality to
Expand Down Expand Up @@ -612,6 +616,23 @@ print(status);

See: [https://developer.apple.com/documentation/adsupport/asidentifiermanager/1614151-advertisingidentifier](https://developer.apple.com/documentation/adsupport/asidentifiermanager/1614151-advertisingidentifier)


### User Data
#### Google DMA Compliance

In response to the European Union's enactment of the Digital Markets Act (DMA), the Branch Android SDK includes the `setDMAParamsForEEA` method to help you pass consent information from your user to Google.

The `setDMAParamsForEEA` method takes 3 parameters:

Parameter Name | Type | Description | When `true`| When `false`
|---|---|---|---|---|
eeaRegion | Boolean | Whether European regulations, including the DMA, apply to this user and conversion | User is `included` in European Union regulations. For example, if the user is located within the EEA, they are within the scope of DMA | User is considered `excluded` from European Union regulations
adPersonalizationConsent | Boolean | Whether end user has `granted` or denied ads personalization | User has `granted` consent for ads personalization. | User has denied consent for ads personalization.
adUserDataUsageConsent | Boolean | Whether end user has granted or denied consent for 3P transmission of user level data for ads. | User has `granted` consent for 3P transmission of user-level data for ads. | User has `denied` consent for 3P transmission of user-level data for ads.

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


# Getting Started
See the `example` directory for a complete sample app using Branch SDK.

Expand Down
10 changes: 5 additions & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ android {
}
defaultConfig {
minSdkVersion 21
compileSdk 33
compileSdk 34
buildConfigField("String", "FBRANCH_VERSION", "\"${getPackageVersion()}\"")
}

Expand All @@ -50,9 +50,9 @@ android {
}

dependencies {
implementation 'io.branch.sdk.android:library:5.8.+'
implementation 'io.branch.sdk.android:library:5.9.+'
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
implementation 'androidx.browser:browser:1.5.0'
implementation 'androidx.lifecycle:lifecycle-runtime:2.5.1'
implementation 'androidx.browser:browser:1.5.0'
implementation 'androidx.lifecycle:lifecycle-runtime:2.7.0'
implementation 'androidx.browser:browser:1.7.0'
implementation "store.galaxy.samsung.installreferrer:samsung_galaxystore_install_referrer:4.0.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ public void onMethodCall(@NonNull MethodCall call, @NonNull Result rawResult) {
case "addSnapPartnerParameter":
addSnapPartnerParameter(call);
break;
case "setDMAParamsForEEA":
setDMAParamsForEEA(call);
break;
default:
result.notImplemented();
break;
Expand Down Expand Up @@ -962,6 +965,18 @@ public void run() {
}
});
}

private void setDMAParamsForEEA(MethodCall call) {
LogUtils.debug(DEBUG_NAME, "triggered setDMAParamsForEEA");
if (!(call.arguments instanceof Map)) {
throw new IllegalArgumentException("Map argument expected");
}
final boolean eeaRegion = Boolean.TRUE.equals(call.argument("eeaRegion"));
final boolean adPersonalizationConsent = Boolean.TRUE.equals(call.argument("adPersonalizationConsent"));
final boolean adUserDataUsageConsent = Boolean.TRUE.equals(call.argument("adUserDataUsageConsent"));

Branch.getInstance().setDMAParamsForEEA(eeaRegion,adPersonalizationConsent,adUserDataUsageConsent);
}
}


12 changes: 6 additions & 6 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PODS:
- BranchSDK (3.0.0)
- BranchSDK (3.3.0)
- Flutter (1.0.0)
- flutter_branch_sdk (7.0.2):
- BranchSDK (~> 3.0.0)
- flutter_branch_sdk (7.1.0):
- BranchSDK (~> 3.3.0)
- Flutter

DEPENDENCIES:
Expand All @@ -20,10 +20,10 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_branch_sdk/ios"

SPEC CHECKSUMS:
BranchSDK: e9c0332b2655cf0357d93db479d07152b059e434
BranchSDK: 262dbab56b767807f49f45191c8499cd9c4b4d76
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_branch_sdk: 074b3a7e9c8214c3f19c1b72840c114abb641b06
flutter_branch_sdk: 1ca1798cfb9ff9acf11028dee0592e3fa0234649

PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048

COCOAPODS: 1.13.0
COCOAPODS: 1.15.2
5 changes: 4 additions & 1 deletion example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -366,6 +366,7 @@
DEVELOPMENT_TEAM = XM2A23Q5KM;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -496,6 +497,7 @@
DEVELOPMENT_TEAM = XM2A23Q5KM;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -520,6 +522,7 @@
DEVELOPMENT_TEAM = XM2A23Q5KM;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Loading

0 comments on commit 178514f

Please sign in to comment.