Skip to content

Commit 329d392

Browse files
authored
Merge pull request #345 from sequoiaat/branch-sdk-v2-with-gdpr-support
Branch sdk v2 with gdpr support
2 parents 4da3c45 + 219172f commit 329d392

File tree

155 files changed

+10471
-7643
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+10471
-7643
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ ___
3636
+ [Tracking user actions and events](#tracking-user-actions-and-events)
3737
+ [Programmatic deep linking](#programmatic-deep-linking)
3838
+ [Debug mode and Apple Search Ads attribution](#debug-mode-and-apple-search-ads-attribution)
39+
+ [Enable or Disable User Tracking](#enable-or-disable-user-tracking)
3940

4041
4. Branch Universal Objects
4142
+ [Instantiate a Branch Universal Object](#create-branch-universal-object)
@@ -808,6 +809,17 @@ JavaScript finishes loading. To use these methods, two options are available.
808809

809810
___
810811

812+
### Enable or Disable User Tracking
813+
In order to comply with tracking requirements, you can disable tracking at the SDK level. Simply call:
814+
```js
815+
branch.disableTracking(true)
816+
```
817+
818+
This will prevent any Branch requests from being sent across the network, except for the case of deep linking. If someone clicks a Branch link, but has expressed not to be tracked, we will return deep linking data back to the client but without tracking information captured.
819+
820+
In do-not-track mode, you will still be able to create and share links. They will not have identifiable information. Event tracking won’t pass data back to the server if a user has expressed to not be tracked. You can change this behavior at any time, but calling the above function. This information will be saved and persisted.
821+
822+
___
811823

812824
## Referral System Rewarding Functionality
813825

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ android {
1919

2020
dependencies {
2121
compile 'com.facebook.react:react-native:+' // From node_modules
22-
compile files('libs/Branch-2.15.0.jar') // From node_modules
22+
compile files('libs/Branch-2.17.1.jar') // From node_modules
2323
}

android/src/main/java/io/branch/rnbranch/RNBranchModule.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,18 @@ public String getName() {
295295
return REACT_MODULE_NAME;
296296
}
297297

298+
@ReactMethod
299+
public void disableTracking(boolean disable) {
300+
Branch branch = Branch.getInstance();
301+
branch.disableTracking(disable);
302+
}
303+
304+
@ReactMethod
305+
public void isTrackingDisabled(Promise promise) {
306+
Branch branch = Branch.getInstance();
307+
promise.resolve(branch.isTrackingDisabled());
308+
}
309+
298310
@ReactMethod
299311
public void createUniversalObject(ReadableMap universalObjectMap, Promise promise) {
300312
String ident = UUID.randomUUID().toString();
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
PODS:
2-
- Branch-SDK (0.22.5):
3-
- Branch-SDK/Core (= 0.22.5)
4-
- Branch-SDK/Core (0.22.5)
5-
- React (0.42.3):
6-
- React/Core (= 0.42.3)
2+
- Branch-SDK (0.24.1):
3+
- Branch-SDK/Core (= 0.24.1)
4+
- Branch-SDK/Core (0.24.1)
5+
- React (0.43.4):
6+
- React/Core (= 0.43.4)
77
- react-native-branch (2.2.5):
88
- Branch-SDK
99
- React
10-
- React/Core (0.42.3):
10+
- React/Core (0.43.4):
1111
- React/cxxreact
12-
- Yoga (= 0.42.3.React)
13-
- React/cxxreact (0.42.3):
12+
- Yoga (= 0.43.4.React)
13+
- React/cxxreact (0.43.4):
1414
- React/jschelpers
15-
- React/jschelpers (0.42.3)
16-
- React/RCTAnimation (0.42.3):
15+
- React/jschelpers (0.43.4)
16+
- React/RCTAnimation (0.43.4):
1717
- React/Core
18-
- React/RCTImage (0.42.3):
18+
- React/RCTImage (0.43.4):
1919
- React/Core
2020
- React/RCTNetwork
21-
- React/RCTNetwork (0.42.3):
21+
- React/RCTNetwork (0.43.4):
2222
- React/Core
23-
- React/RCTText (0.42.3):
23+
- React/RCTText (0.43.4):
2424
- React/Core
25-
- React/RCTWebSocket (0.42.3):
25+
- React/RCTWebSocket (0.43.4):
2626
- React/Core
27-
- Yoga (0.42.3.React)
27+
- Yoga (0.43.4.React)
2828

2929
DEPENDENCIES:
3030
- Branch-SDK (from `node_modules/react-native-branch/ios`)
@@ -48,11 +48,11 @@ EXTERNAL SOURCES:
4848
:path: node_modules/react-native/ReactCommon/yoga
4949

5050
SPEC CHECKSUMS:
51-
Branch-SDK: 82b57443b76b28193ac22e0f7e9afc2c62c21e7f
52-
React: 35e039680feacd0563677d49ba410112d2748559
53-
react-native-branch: 463977136001e2e8f9142384916b82de3c6b6e29
54-
Yoga: 86ce777665c8259b94ef8dbea76b84634237f4ea
51+
Branch-SDK: 6465b450b555f3a46611307bc2dba787dd0fcb1d
52+
React: 8f52d52389ef8a271b049f81634343290f59a356
53+
react-native-branch: 8988998ef912c6373dc39a24e4638f02a1268265
54+
Yoga: ee3dae4d89b27276f4be20241c2bab84f296b626
5555

5656
PODFILE CHECKSUM: add4645b825f22aaa2eb629899a1687f650a9588
5757

58-
COCOAPODS: 1.3.1
58+
COCOAPODS: 1.5.0

examples/testbed_native_ios/Pods/Headers/Private/Branch-SDK/Branch/BNCApplication.h

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/testbed_native_ios/Pods/Headers/Private/Branch-SDK/Branch/BNCKeyChain.h

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/testbed_native_ios/Pods/Headers/Private/Branch-SDK/Branch/BNCURLBlackList.h

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/testbed_native_ios/Pods/Headers/Private/Branch-SDK/Branch/Branch+Validator.h

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/testbed_native_ios/Pods/Headers/Private/React/RCTDevLoadingView.h

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)