Skip to content

Commit

Permalink
Merge pull request #299 from RodrigoSMarques/master
Browse files Browse the repository at this point in the history
PR Branch MASTER into BUGFIX
  • Loading branch information
RodrigoSMarques committed Apr 7, 2024
2 parents 5419004 + 3dbada4 commit 2a094ea
Show file tree
Hide file tree
Showing 34 changed files with 561 additions and 337 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-apk.yaml
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v3.13.0
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-web.yaml
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
Expand All @@ -44,4 +44,4 @@ jobs:
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1
timeout-minutes: 1
4 changes: 2 additions & 2 deletions .github/workflows/pr-bugfix-dev.yaml
Expand Up @@ -9,7 +9,7 @@ jobs:
pull-request:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: pull-request-master-to-bugfix
if: ${{ github.repository == 'RodrigoSMarques/flutter_branch_sdk' }}
uses: repo-sync/pull-request@v2.6.2
Expand All @@ -21,4 +21,4 @@ jobs:
pr_label: "auto-pr"
pr_draft: false
pr_allow_empty: false
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/pr-master-bugfix.yaml
Expand Up @@ -9,7 +9,7 @@ jobs:
pull-request:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: pull-request-master-to-bugfix
if: ${{ github.repository == 'RodrigoSMarques/flutter_branch_sdk' }}
uses: repo-sync/pull-request@v2.6.2
Expand All @@ -21,4 +21,4 @@ jobs:
pr_label: "auto-pr"
pr_draft: false
pr_allow_empty: false
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/publish-plugin.yml
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- name: Setup Flutter
uses: subosito/flutter-action@v2
Expand Down
32 changes: 32 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,35 @@
## 7.3.0
### 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
* `showShareSheet` method will now display the native Android share sheet.
* Documentation review

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

### 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
* 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
45 changes: 35 additions & 10 deletions README.md
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.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)

Implemented functions in plugin:

Expand Down Expand Up @@ -45,36 +45,38 @@ For details see:
## Configure Platform Project
### Android Integration

Follow the steps:
Follow only the steps:

* [Configure App](https://help.branch.io/developers-hub/docs/android-basic-integration#4-configure-app)
* [Configure ProGuard](https://help.branch.io/developers-hub/docs/android-basic-integration#7-configure-proguard)

-
**Note**: It is not necessary to perform the Branch Android SDK installation steps. The plugin performs these steps.

### iOS Integration
Follow the steps:
Follow only the steps:

* [Configure bundle identifier](https://help.branch.io/developers-hub/docs/ios-basic-integration#2-configure-bundle-identifier)
* [Configure associated domains](https://help.branch.io/developers-hub/docs/ios-basic-integration#3-configure-associated-domains)
* [Configure Info.plist](https://help.branch.io/developers-hub/docs/ios-basic-integration#4-configure-infoplist)

**Note**: It is not necessary to perform the Branch iOS SDK installation steps. The plugin performs these steps.

#### NativeLink™ Deferred Deep Linking
Use iOS pasteboard to enable deferred deep linking via Branch NativeLink™, which enables 100% matching on iOS through Installs.

Follow the steps on the [page](https://help.branch.io/developers-hub/docs/ios-advanced-features#nativelink-deferred-deep-linking), session _**NativeLink™ Deferred Deep Linking**_,

Note: Code implementation in Swift is not necessary. The plugin already implements the code, requiring only configuration on the Dashboard.

-
**Note**: Code implementation in Swift is not necessary. The plugin already implements the code, requiring only configuration on the Dashboard.

### Web Integration

You need add Branch Javascript in your `web\index.html` at the top of your `<body>` tag, to be able to use this package.

```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,27 @@ 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:

```dart
FlutterBranchSdk.setDMAParamsForEEA(eeaRegion: true, adPersonalizationConsent: false, adUserDataUsageConsent: false);
```

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
12 changes: 6 additions & 6 deletions android/build.gradle
Expand Up @@ -15,7 +15,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath 'com.android.tools.build:gradle:7.3.1'
}
}

Expand All @@ -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.11.+'
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.8.0'
implementation "store.galaxy.samsung.installreferrer:samsung_galaxystore_install_referrer:4.0.0"
}
7 changes: 7 additions & 0 deletions android/src/main/AndroidManifest.xml
@@ -1,4 +1,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="br.com.rsmarques.flutter_branch_sdk">
<uses-permission android:name="android.permission.INTERNET" />
<application>
<receiver android:name="io.branch.receivers.SharingBroadcastReceiver" android:exported="true">
<intent-filter>
<action android:name="EXTRA_CHOSEN_COMPONENT" />
</intent-filter>
</receiver>
</application>
</manifest>

0 comments on commit 2a094ea

Please sign in to comment.