Skip to content

Commit

Permalink
Merge pull request #543 from BranchMetrics/SDK-746_update-native-sdks…
Browse files Browse the repository at this point in the history
…-for-3.x

[SDK-746] [SDK-878] Update native SDKs for 3.x
  • Loading branch information
jdee authored Feb 27, 2020
2 parents b9279be + 0c5260e commit 006f7ce
Show file tree
Hide file tree
Showing 13 changed files with 85 additions and 175 deletions.
125 changes: 66 additions & 59 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (2.3.6)
CFPropertyList (3.0.2)
activesupport (4.2.11.1)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
algoliasearch (1.27.1)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
babosa (1.0.2)
backports (3.15.0)
claide (1.0.2)
cocoapods (1.7.5)
babosa (1.0.3)
backports (3.16.1)
claide (1.0.3)
cocoapods (1.8.4)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.7.5)
cocoapods-core (= 1.8.4)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.2.2, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-stats (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.3.1, < 2.0)
cocoapods-trunk (>= 1.4.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
Expand All @@ -31,47 +34,49 @@ GEM
molinillo (~> 0.6.6)
nap (~> 1.0)
ruby-macho (~> 1.4)
xcodeproj (>= 1.10.0, < 2.0)
cocoapods-core (1.7.5)
xcodeproj (>= 1.11.1, < 2.0)
cocoapods-core (1.8.4)
activesupport (>= 4.0.2, < 6)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
cocoapods-deintegrate (1.0.4)
cocoapods-downloader (1.2.2)
cocoapods-downloader (1.3.0)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.1.0)
cocoapods-trunk (1.3.1)
cocoapods-trunk (1.4.1)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.1.0)
colored (1.2)
colored2 (3.1.2)
commander-fastlane (4.4.6)
highline (~> 1.7.2)
concurrent-ruby (1.1.5)
concurrent-ruby (1.1.6)
connection_pool (2.2.2)
declarative (0.0.10)
declarative-option (0.1.0)
digest-crc (0.4.1)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.4)
dotenv (2.7.5)
emoji_regex (1.0.1)
escape (0.0.4)
ethon (0.12.0)
ffi (>= 1.3.0)
excon (0.65.0)
faraday (0.15.4)
excon (0.72.0)
faraday (0.17.3)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
faraday (>= 0.7.4)
http-cookie (~> 1.0.0)
faraday_middleware (0.13.1)
faraday (>= 0.7.4, < 1.0)
fastimage (2.1.5)
fastlane (2.128.1)
fastimage (2.1.7)
fastlane (2.142.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
babosa (>= 1.0.2, < 2.0.0)
Expand All @@ -80,13 +85,13 @@ GEM
commander-fastlane (>= 4.4.6, < 5.0.0)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 2.0)
excon (>= 0.45.0, < 1.0.0)
faraday (~> 0.9)
excon (>= 0.71.0, < 1.0.0)
faraday (~> 0.17)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 0.9)
faraday_middleware (~> 0.13.1)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-api-client (>= 0.21.2, < 0.24.0)
google-api-client (>= 0.29.2, < 0.37.0)
google-cloud-storage (>= 1.15.0, < 2.0.0)
highline (>= 1.7.2, < 2.0.0)
json (< 3.0.0)
Expand All @@ -96,7 +101,7 @@ GEM
multipart-post (~> 2.0.0)
plist (>= 3.1.0, < 4.0.0)
public_suffix (~> 2.0.0)
rubyzip (>= 1.2.2, < 2.0.0)
rubyzip (>= 1.3.0, < 2.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
slack-notifier (>= 2.0.0, < 3.0.0)
Expand All @@ -105,13 +110,13 @@ GEM
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.8.1, < 2.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-patch (0.5.0)
pattern_patch (>= 0.5.1)
fastlane-plugin-yarn (1.1)
ffi (1.11.1)
fastlane-plugin-yarn (1.2)
ffi (1.12.2)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh (0.14.0)
Expand All @@ -122,48 +127,50 @@ GEM
net-http-persistent (>= 2.7)
net-http-pipeline
gh_inspector (1.1.3)
google-api-client (0.23.9)
google-api-client (0.36.4)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.5, < 0.7.0)
googleauth (~> 0.9)
httpclient (>= 2.8.1, < 3.0)
mime-types (~> 3.0)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.9)
google-cloud-core (1.3.0)
signet (~> 0.12)
google-cloud-core (1.5.0)
google-cloud-env (~> 1.0)
google-cloud-env (1.2.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.3.0)
faraday (~> 0.11)
google-cloud-storage (1.16.0)
google-cloud-errors (1.0.0)
google-cloud-storage (1.25.1)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-api-client (~> 0.23)
google-api-client (~> 0.33)
google-cloud-core (~> 1.2)
googleauth (>= 0.6.2, < 0.10.0)
googleauth (0.6.7)
faraday (~> 0.12)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.11.0)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.7)
signet (~> 0.12)
highline (1.7.10)
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
json (2.2.0)
json (2.3.0)
jwt (2.1.0)
launchy (2.4.3)
addressable (~> 2.3)
memoist (0.16.0)
mime-types (3.2.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.0331)
mini_magick (4.9.5)
minitest (5.11.3)
memoist (0.16.2)
mini_magick (4.10.1)
mini_mime (1.0.2)
minitest (5.14.0)
molinillo (0.6.6)
multi_json (1.13.1)
multi_json (1.14.1)
multi_xml (0.6.0)
multipart-post (2.0.0)
nanaimo (0.2.6)
Expand All @@ -174,8 +181,8 @@ GEM
net-http-pipeline (1.0.1)
netrc (0.11.0)
os (1.0.1)
pattern_patch (0.5.5)
activesupport (~> 4.2)
pattern_patch (1.0.0)
activesupport (>= 4.0.2, < 6)
plist (3.5.0)
public_suffix (2.0.5)
pusher-client (0.6.2)
Expand All @@ -188,14 +195,14 @@ GEM
retriable (3.1.2)
rouge (2.0.7)
ruby-macho (1.4.0)
rubyzip (1.2.3)
rubyzip (1.3.0)
security (0.1.3)
signet (0.11.0)
signet (0.13.0)
addressable (~> 2.3)
faraday (~> 0.9)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.5)
simctl (1.6.8)
CFPropertyList
naturally
slack-notifier (2.3.2)
Expand All @@ -212,22 +219,22 @@ GEM
launchy (~> 2.1)
pusher-client (~> 0.4)
typhoeus (~> 0.6, >= 0.6.8)
tty-cursor (0.7.0)
tty-screen (0.7.0)
tty-spinner (0.9.1)
tty-cursor (0.7.1)
tty-screen (0.7.1)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
typhoeus (0.8.0)
ethon (>= 0.8.0)
tzinfo (1.2.5)
tzinfo (1.2.6)
thread_safe (~> 0.1)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.6)
unicode-display_width (1.6.0)
unicode-display_width (1.6.1)
websocket (1.2.8)
word_wrap (1.0.0)
xcodeproj (1.11.0)
xcodeproj (1.15.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
Expand Down
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ Note that the `react-native-branch` module requires `react-native` >= 0.40, <
4. Install the native Branch SDK using [CocoaPods](./docs/cocoapods.md) or [Carthage](./docs/carthage.md).
5. Follow the [setup instructions](#setup).

**Note:** This SDK currently does not work in projects using NPM instead of yarn.
See #433. The RN toolchain will use yarn by default. Please use
`yarn add react-native-branch` to add the SDK to your project.

___

### Updating from an earlier version or starting with v3.0.0
Expand Down Expand Up @@ -812,12 +808,10 @@ JavaScript finishes loading. To use these methods, two options are available.
- Add a [branch.json](./docs/branch.json.md) file to your project.

This allows you to enable debug mode (to simulate install events on both
Android and iOS), Apple Search Ads attribution and Apple Search Ads debug
mode from a configuration file.
Android and iOS), Apple Search Ads attribution from a configuration file.

- Add native iOS and Android method calls to your project.

+ [Debug mode (simulated install events)](./docs/setDebug.md)
+ [Apple Search Ads attribution](https://github.com/BranchMetrics/ios-branch-deep-linking#apple-search-ads)

___
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ android {

dependencies {
implementation 'com.facebook.react:react-native:+' // From node_modules
api 'io.branch.sdk.android:library:3.2.0'
api 'io.branch.sdk.android:library:4.3.2'
}
10 changes: 0 additions & 10 deletions android/src/main/java/io/branch/rnbranch/RNBranchModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -245,16 +245,6 @@ public Map<String, Object> getConstants() {
constants.put(INIT_SESSION_SUCCESS, RN_INIT_SESSION_SUCCESS_EVENT);
constants.put(INIT_SESSION_ERROR, RN_INIT_SESSION_ERROR_EVENT);

// Constants for use with userCompletedAction (deprecated)

constants.put(ADD_TO_CART_EVENT, BranchEvent.ADD_TO_CART);
constants.put(ADD_TO_WISHLIST_EVENT, BranchEvent.ADD_TO_WISH_LIST);
constants.put(PURCHASED_EVENT, BranchEvent.PURCHASED);
constants.put(PURCHASE_INITIATED_EVENT, BranchEvent.PURCHASE_STARTED);
constants.put(REGISTER_VIEW_EVENT, BranchEvent.VIEW);
constants.put(SHARE_COMPLETED_EVENT, BranchEvent.SHARE_COMPLETED);
constants.put(SHARE_INITIATED_EVENT, BranchEvent.SHARE_STARTED);

// constants for use with BranchEvent

// Commerce events
Expand Down
4 changes: 1 addition & 3 deletions docs/branch.json.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ version 3.x of react-native-branch, using [RNBranchModule.getAutoInstance()](../

|key|description|type|
|---|---|---|
|appleSearchAdsDebugMode|If true, `setAppleSearchAdsDebugMode` will be called on the iOS Branch instance. Ignored on Android.|Boolean|
|branchKey|The Branch key to use. Overrides liveKey, testKey and useTestInstance.|String|
|liveKey|The live Branch key to use if useTestInstance is false. Ignored if useTestInstance is true or branchKey is present.|String|
|debugMode|If true, `setDebug` will be called in the native SDK, enabling testing of install events.|Boolean|
Expand All @@ -114,7 +113,6 @@ See [branch.example.json](https://github.com/BranchMetrics/react-native-branch-d
"liveKey": "key_live_xxxx",
"testKey": "key_test_yyyy",
"useTestInstance": true,
"delayInitToCheckForSearchAds": true,
"appleSearchAdsDebugMode": true
"delayInitToCheckForSearchAds": true
}
```
4 changes: 2 additions & 2 deletions docs/carthage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Installation using Carthage

Carthage requires version 3.0.1 of react-native-branch.
Carthage requires version 3.x of react-native-branch.

Add react-native-branch to your project:

Expand All @@ -12,7 +12,7 @@ react-native link react-native-branch
If you already have a Cartfile, add this to your Cartfile:

```
github "BranchMetrics/ios-branch-deep-linking" "0.27.0"
github "BranchMetrics/ios-branch-deep-linking" "0.31.3"
```

Now run `carthage build`.
Expand Down
4 changes: 2 additions & 2 deletions examples/webview_example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ DEPENDENCIES:
- yoga (from `../node_modules/react-native/ReactCommon/yoga`)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
trunk:
- boost-for-react-native
- Branch
- DoubleConversion
Expand Down Expand Up @@ -121,4 +121,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: dc80f3ddb20f97698e6bb83eb449978b5fb673ec

COCOAPODS: 1.7.5
COCOAPODS: 1.8.4
1 change: 0 additions & 1 deletion ios/RNBranch.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ extern NSString * _Nonnull const RNBranchLinkOpenedNotificationLinkPropertiesKey

+ (void)setDebug;
+ (void)delayInitToCheckForSearchAds;
+ (void)setAppleSearchAdsDebugMode;
+ (void)setRequestMetadataKey:(NSString * _Nonnull)key value:(NSObject * _Nonnull)value;

@end
Loading

0 comments on commit 006f7ce

Please sign in to comment.