From fff2b04752f207e00eaf0bb81041c4cbd0c3a92c Mon Sep 17 00:00:00 2001 From: Jimmy Dee Date: Fri, 27 Mar 2020 11:48:10 -0700 Subject: [PATCH 01/16] Add compiler flag to podspec(s) --- ios/react-native-branch-dev.podspec | 1 + react-native-branch.podspec | 1 + 2 files changed, 2 insertions(+) diff --git a/ios/react-native-branch-dev.podspec b/ios/react-native-branch-dev.podspec index e26c0946b..1bb5af393 100644 --- a/ios/react-native-branch-dev.podspec +++ b/ios/react-native-branch-dev.podspec @@ -20,6 +20,7 @@ Pod::Spec.new do |s| s.platform = :ios, "7.0" s.source = { spec['repository']['type'].to_sym => spec['repository']['url'].sub(/^[a-z]+\+/, '') } s.source_files = [ "ios/*.h", "ios/*.m"] + s.compiler_flags = %[-DRNBRANCH_VERSION=@\\"#{s.version}\\"] s.dependency 'Branch' # No version specified s.dependency 'React' # to ensure the correct build order end diff --git a/react-native-branch.podspec b/react-native-branch.podspec index 52f1a492d..d4237141a 100644 --- a/react-native-branch.podspec +++ b/react-native-branch.podspec @@ -20,6 +20,7 @@ Pod::Spec.new do |s| s.platform = :ios, "7.0" s.source = { spec['repository']['type'].to_sym => spec['repository']['url'].sub(/^[a-z]+\+/, '') } s.source_files = [ "ios/*.h", "ios/*.m"] + s.compiler_flags = %[-DRNBRANCH_VERSION=@\\"#{s.version}\\"] s.dependency 'Branch', '0.31.3' s.dependency 'React' # to ensure the correct build order end From 55c2c0ca4db599f5b10e48d883dbbd8a820214d0 Mon Sep 17 00:00:00 2001 From: Jimmy Dee Date: Fri, 27 Mar 2020 11:49:34 -0700 Subject: [PATCH 02/16] Add registerPluginName:version: call in RNBranch.m --- ios/RNBranch.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ios/RNBranch.m b/ios/RNBranch.m index 06a41dbf7..b0679b53e 100644 --- a/ios/RNBranch.m +++ b/ios/RNBranch.m @@ -158,6 +158,8 @@ + (void)initSessionWithLaunchOptions:(NSDictionary *)launchOptions isReferrable: savedLaunchOptions = launchOptions; savedIsReferrable = isReferrable; + [self.branch registerPluginName:@"ReactNative" version:RNBRANCH_VERSION]; + // Can't currently support this on Android. // if (!deferInitializationForJSLoad && !RNBranchConfig.instance.deferInitializationForJSLoad) [self initializeBranchSDK]; [self initializeBranchSDK]; From 4d74ddd4c9f55cae4205dc4f3d81496754b6a2b3 Mon Sep 17 00:00:00 2001 From: Jimmy Dee Date: Fri, 27 Mar 2020 11:54:21 -0700 Subject: [PATCH 03/16] Pass RNBRANCH_VERSION in build.gradle --- android/build.gradle | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/android/build.gradle b/android/build.gradle index 66db0c658..4e440f428 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,4 +1,11 @@ apply plugin: 'com.android.library' +import groovy.json.JsonSlurper + +def getNpmVersion() { + def packageJsonFile = new File(rootProject.projectDir.parentFile, 'package.json') + def packageJson = new JsonSlurper().parseText(packageJsonFile.text) + return packageJson.version +} repositories { mavenCentral() @@ -17,6 +24,8 @@ android { targetSdkVersion safeExtGet('targetSdkVersion', 26) versionCode 1 versionName "1.0" + + buildConfigField("String", "RNBRANCH_VERSION", "\"${getNpmVersion()}\"") } } From 9b8345a7725348fdaa19e68322a03dedb25d0eb8 Mon Sep 17 00:00:00 2001 From: Jimmy Dee Date: Fri, 27 Mar 2020 11:55:50 -0700 Subject: [PATCH 04/16] Call registerPlugin (Android) --- android/src/main/java/io/branch/rnbranch/RNBranchModule.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/android/src/main/java/io/branch/rnbranch/RNBranchModule.java b/android/src/main/java/io/branch/rnbranch/RNBranchModule.java index 89ccbcaa9..a0ba1d2da 100644 --- a/android/src/main/java/io/branch/rnbranch/RNBranchModule.java +++ b/android/src/main/java/io/branch/rnbranch/RNBranchModule.java @@ -73,6 +73,7 @@ public class RNBranchModule extends ReactContextBaseJavaModule { private static final String IDENT_FIELD_NAME = "ident"; public static final String UNIVERSAL_OBJECT_NOT_FOUND_ERROR_CODE = "RNBranch::Error::BUONotFound"; private static final long AGING_HASH_TTL = 3600000; + private static final String PLUGIN_NAME = "ReactNative"; private static JSONObject initSessionResult = null; private BroadcastReceiver mInitSessionEventReceiver = null; @@ -92,6 +93,8 @@ public static void getAutoInstance(Context context) { String testKey = config.getTestKey(); boolean useTest = config.getUseTestInstance(); + Branch.registerPlugin(PLUGIN_NAME, io.branch.rnbranch.BuildConfig.RNBRANCH_VERSION); + if (branchKey != null) { Branch.getAutoInstance(context, branchKey); } From c4f25056ec3ffc55389e7db4333ad29072665e0b Mon Sep 17 00:00:00 2001 From: Jimmy Dee Date: Fri, 27 Mar 2020 12:04:48 -0700 Subject: [PATCH 05/16] bundle update --- Gemfile.lock | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 70d5d3c64..bcb898107 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -13,8 +13,24 @@ GEM httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) atomos (0.1.3) + aws-eventstream (1.0.3) + aws-partitions (1.288.0) + aws-sdk-core (3.92.0) + aws-eventstream (~> 1.0, >= 1.0.2) + aws-partitions (~> 1, >= 1.239.0) + aws-sigv4 (~> 1.1) + jmespath (~> 1.0) + aws-sdk-kms (1.30.0) + aws-sdk-core (~> 3, >= 3.71.0) + aws-sigv4 (~> 1.1) + aws-sdk-s3 (1.61.1) + aws-sdk-core (~> 3, >= 3.83.0) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.1) + aws-sigv4 (1.1.1) + aws-eventstream (~> 1.0, >= 1.0.2) babosa (1.0.3) - backports (3.16.1) + backports (3.17.0) claide (1.0.3) cocoapods (1.8.4) activesupport (>= 4.0.2, < 5) @@ -59,7 +75,7 @@ GEM connection_pool (2.2.2) declarative (0.0.10) declarative-option (0.1.0) - digest-crc (0.4.1) + digest-crc (0.5.1) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) dotenv (2.7.5) @@ -67,7 +83,7 @@ GEM escape (0.0.4) ethon (0.12.0) ffi (>= 1.3.0) - excon (0.72.0) + excon (0.73.0) faraday (0.17.3) multipart-post (>= 1.2, < 3) faraday-cookie_jar (0.0.6) @@ -76,9 +92,10 @@ GEM faraday_middleware (0.13.1) faraday (>= 0.7.4, < 1.0) fastimage (2.1.7) - fastlane (2.142.0) + fastlane (2.144.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.3, < 3.0.0) + aws-sdk-s3 (~> 1.0) babosa (>= 1.0.2, < 2.0.0) bundler (>= 1.12.0, < 3.0.0) colored @@ -138,8 +155,8 @@ GEM google-cloud-core (1.5.0) google-cloud-env (~> 1.0) google-cloud-errors (~> 1.0) - google-cloud-env (1.3.0) - faraday (~> 0.11) + google-cloud-env (1.3.1) + faraday (>= 0.17.3, < 2.0) google-cloud-errors (1.0.0) google-cloud-storage (1.25.1) addressable (~> 2.5) @@ -161,10 +178,11 @@ GEM httpclient (2.8.3) i18n (0.9.5) concurrent-ruby (~> 1.0) + jmespath (1.4.0) json (2.3.0) jwt (2.1.0) - launchy (2.4.3) - addressable (~> 2.3) + launchy (2.5.0) + addressable (~> 2.7) memoist (0.16.2) mini_magick (4.10.1) mini_mime (1.0.2) @@ -197,7 +215,7 @@ GEM ruby-macho (1.4.0) rubyzip (1.3.0) security (0.1.3) - signet (0.13.0) + signet (0.13.2) addressable (~> 2.3) faraday (>= 0.17.3, < 2.0) jwt (>= 1.5, < 3.0) @@ -210,7 +228,7 @@ GEM terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) thread_safe (0.3.6) - travis (1.8.10) + travis (1.8.12) backports faraday (~> 0.9) faraday_middleware (~> 0.9, >= 0.9.1) @@ -231,7 +249,7 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.7.6) - unicode-display_width (1.6.1) + unicode-display_width (1.7.0) websocket (1.2.8) word_wrap (1.0.0) xcodeproj (1.15.0) @@ -256,4 +274,4 @@ DEPENDENCIES travis BUNDLED WITH - 1.17.3 + 2.1.4 From de36b8ce2a287dcc36c61826767f1b5b4c7423b2 Mon Sep 17 00:00:00 2001 From: Jimmy Dee Date: Fri, 27 Mar 2020 12:05:01 -0700 Subject: [PATCH 06/16] Update Travis to Ruby 2.6.3 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index cdc570770..b5fed97e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,8 @@ cache: yarn install: # Set up RVM, RubyGems, Bundler - - rvm install 2.4.3 - - rvm use 2.4.3 --default + - rvm install 2.6.3 + - rvm use 2.6.3 --default - gem update --system - gem install bundler - bundle check || bundle install From 62760a7517064498d783c1016c78220198baf713 Mon Sep 17 00:00:00 2001 From: Jimmy Dee Date: Fri, 27 Mar 2020 12:05:17 -0700 Subject: [PATCH 07/16] Update native SDKs --- android/build.gradle | 4 ++-- native-tests/ios/Podfile.lock | 12 ++++++------ react-native-branch.podspec | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 4e440f428..3964535fe 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' import groovy.json.JsonSlurper def getNpmVersion() { - def packageJsonFile = new File(rootProject.projectDir.parentFile, 'package.json') + def packageJsonFile = file('../package.json') def packageJson = new JsonSlurper().parseText(packageJsonFile.text) return packageJson.version } @@ -31,5 +31,5 @@ android { dependencies { implementation 'com.facebook.react:react-native:+' // From node_modules - api 'io.branch.sdk.android:library:4.3.2' + api 'io.branch.sdk.android:library:5.0.0' } diff --git a/native-tests/ios/Podfile.lock b/native-tests/ios/Podfile.lock index 804582d42..2a7c98dbe 100644 --- a/native-tests/ios/Podfile.lock +++ b/native-tests/ios/Podfile.lock @@ -1,8 +1,8 @@ PODS: - boost-for-react-native (1.63.0) - - Branch (0.31.3): - - Branch/Core (= 0.31.3) - - Branch/Core (0.31.3) + - Branch (0.32.0): + - Branch/Core (= 0.32.0) + - Branch/Core (0.32.0) - DoubleConversion (1.1.5) - Folly (2018.10.22.00): - boost-for-react-native @@ -13,7 +13,7 @@ PODS: - React (0.59.10): - React/Core (= 0.59.10) - react-native-branch (3.2.1): - - Branch (= 0.31.3) + - Branch (= 0.32.0) - React - React/Core (0.59.10): - yoga (= 0.59.10.React) @@ -83,13 +83,13 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c - Branch: 9b299693ee54b308ff8c18146afe1f711c2069ec + Branch: 770a23c04d3f5410cf9231db099a444dd3060784 DoubleConversion: e22e0762848812a87afd67ffda3998d9ef29170c Folly: de497beb10f102453a1afa9edbf8cf8a251890de glog: 1de0bb937dccdc981596d3b5825ebfb765017ded OCMock: 5ea90566be239f179ba766fd9fbae5885040b992 React: 36d0768f9e93be2473b37e7fa64f92c1d5341eef - react-native-branch: 18ffa5516f2463d6fa05a5f10699e28495cc9510 + react-native-branch: f6f8f24151238718e4d9b26be18a7111078d7fc9 yoga: 684513b14b03201579ba3cee20218c9d1298b0cc PODFILE CHECKSUM: 7e9d5ee0f6ae095e090eae4851f9ec8bc15c4c31 diff --git a/react-native-branch.podspec b/react-native-branch.podspec index d4237141a..8b527cf03 100644 --- a/react-native-branch.podspec +++ b/react-native-branch.podspec @@ -21,6 +21,6 @@ Pod::Spec.new do |s| s.source = { spec['repository']['type'].to_sym => spec['repository']['url'].sub(/^[a-z]+\+/, '') } s.source_files = [ "ios/*.h", "ios/*.m"] s.compiler_flags = %[-DRNBRANCH_VERSION=@\\"#{s.version}\\"] - s.dependency 'Branch', '0.31.3' + s.dependency 'Branch', '0.32.0' s.dependency 'React' # to ensure the correct build order end From 4163d05ccbe00be55c38df836c4be0960dd6095f Mon Sep 17 00:00:00 2001 From: Jimmy Dee Date: Fri, 27 Mar 2020 12:08:35 -0700 Subject: [PATCH 08/16] Remove Gemfile.lock again. Travis wants 2.6 as well. --- .gitignore | 3 + .travis.yml | 4 +- Gemfile.lock | 277 --------------------------------------------------- 3 files changed, 5 insertions(+), 279 deletions(-) delete mode 100644 Gemfile.lock diff --git a/.gitignore b/.gitignore index e0b116ff4..e787f347f 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,6 @@ android/build .idea Pods + +# Because of bundler 1.x/2.x issues +Gemfile.lock diff --git a/.travis.yml b/.travis.yml index b5fed97e2..0dea2873a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,8 @@ cache: yarn install: # Set up RVM, RubyGems, Bundler - - rvm install 2.6.3 - - rvm use 2.6.3 --default + - rvm install 2.6 + - rvm use 2.6 --default - gem update --system - gem install bundler - bundle check || bundle install diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index bcb898107..000000000 --- a/Gemfile.lock +++ /dev/null @@ -1,277 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - 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.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) - aws-eventstream (1.0.3) - aws-partitions (1.288.0) - aws-sdk-core (3.92.0) - aws-eventstream (~> 1.0, >= 1.0.2) - aws-partitions (~> 1, >= 1.239.0) - aws-sigv4 (~> 1.1) - jmespath (~> 1.0) - aws-sdk-kms (1.30.0) - aws-sdk-core (~> 3, >= 3.71.0) - aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.61.1) - aws-sdk-core (~> 3, >= 3.83.0) - aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.1) - aws-sigv4 (1.1.1) - aws-eventstream (~> 1.0, >= 1.0.2) - babosa (1.0.3) - backports (3.17.0) - claide (1.0.3) - cocoapods (1.8.4) - activesupport (>= 4.0.2, < 5) - claide (>= 1.0.2, < 2.0) - 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.4.0, < 2.0) - cocoapods-try (>= 1.1.0, < 2.0) - colored2 (~> 3.1) - escape (~> 0.0.4) - fourflusher (>= 2.3.0, < 3.0) - gh_inspector (~> 1.0) - molinillo (~> 0.6.6) - nap (~> 1.0) - ruby-macho (~> 1.4) - 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.3.0) - cocoapods-plugins (1.0.0) - nap - cocoapods-search (1.0.0) - cocoapods-stats (1.1.0) - 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.6) - connection_pool (2.2.2) - declarative (0.0.10) - declarative-option (0.1.0) - digest-crc (0.5.1) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) - dotenv (2.7.5) - emoji_regex (1.0.1) - escape (0.0.4) - ethon (0.12.0) - ffi (>= 1.3.0) - excon (0.73.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.7) - fastlane (2.144.0) - CFPropertyList (>= 2.3, < 4.0.0) - addressable (>= 2.3, < 3.0.0) - aws-sdk-s3 (~> 1.0) - babosa (>= 1.0.2, < 2.0.0) - bundler (>= 1.12.0, < 3.0.0) - colored - commander-fastlane (>= 4.4.6, < 5.0.0) - dotenv (>= 2.1.1, < 3.0.0) - emoji_regex (>= 0.1, < 2.0) - excon (>= 0.71.0, < 1.0.0) - faraday (~> 0.17) - faraday-cookie_jar (~> 0.0.6) - faraday_middleware (~> 0.13.1) - fastimage (>= 2.1.0, < 3.0.0) - gh_inspector (>= 1.1.2, < 2.0.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) - jwt (~> 2.1.0) - mini_magick (>= 4.9.4, < 5.0.0) - multi_xml (~> 0.5) - multipart-post (~> 2.0.0) - plist (>= 3.1.0, < 4.0.0) - public_suffix (~> 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) - terminal-notifier (>= 2.0.0, < 3.0.0) - terminal-table (>= 1.4.5, < 2.0.0) - tty-screen (>= 0.6.3, < 1.0.0) - tty-spinner (>= 0.8.0, < 1.0.0) - word_wrap (~> 1.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.2) - ffi (1.12.2) - fourflusher (2.3.1) - fuzzy_match (2.0.4) - gh (0.14.0) - addressable - backports - faraday (~> 0.8) - multi_json (~> 1.0) - net-http-persistent (>= 2.7) - net-http-pipeline - gh_inspector (1.1.3) - google-api-client (0.36.4) - addressable (~> 2.5, >= 2.5.1) - googleauth (~> 0.9) - httpclient (>= 2.8.1, < 3.0) - mini_mime (~> 1.0) - representable (~> 3.0) - retriable (>= 2.0, < 4.0) - signet (~> 0.12) - google-cloud-core (1.5.0) - google-cloud-env (~> 1.0) - google-cloud-errors (~> 1.0) - google-cloud-env (1.3.1) - faraday (>= 0.17.3, < 2.0) - google-cloud-errors (1.0.0) - google-cloud-storage (1.25.1) - addressable (~> 2.5) - digest-crc (~> 0.4) - google-api-client (~> 0.33) - google-cloud-core (~> 1.2) - 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.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) - jmespath (1.4.0) - json (2.3.0) - jwt (2.1.0) - launchy (2.5.0) - addressable (~> 2.7) - 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.14.1) - multi_xml (0.6.0) - multipart-post (2.0.0) - nanaimo (0.2.6) - nap (1.1.0) - naturally (2.2.0) - net-http-persistent (3.1.0) - connection_pool (~> 2.2) - net-http-pipeline (1.0.1) - netrc (0.11.0) - os (1.0.1) - pattern_patch (1.0.0) - activesupport (>= 4.0.2, < 6) - plist (3.5.0) - public_suffix (2.0.5) - pusher-client (0.6.2) - json - websocket (~> 1.0) - representable (3.0.4) - declarative (< 0.1.0) - declarative-option (< 0.2.0) - uber (< 0.2.0) - retriable (3.1.2) - rouge (2.0.7) - ruby-macho (1.4.0) - rubyzip (1.3.0) - security (0.1.3) - signet (0.13.2) - addressable (~> 2.3) - faraday (>= 0.17.3, < 2.0) - jwt (>= 1.5, < 3.0) - multi_json (~> 1.10) - simctl (1.6.8) - CFPropertyList - naturally - slack-notifier (2.3.2) - terminal-notifier (2.0.0) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) - thread_safe (0.3.6) - travis (1.8.12) - backports - faraday (~> 0.9) - faraday_middleware (~> 0.9, >= 0.9.1) - gh (~> 0.13) - highline (~> 1.6) - launchy (~> 2.1) - pusher-client (~> 0.4) - typhoeus (~> 0.6, >= 0.6.8) - 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.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.7.0) - websocket (1.2.8) - word_wrap (1.0.0) - xcodeproj (1.15.0) - CFPropertyList (>= 2.3.3, < 4.0) - atomos (~> 0.1.3) - claide (>= 1.0.2, < 2.0) - colored2 (~> 3.1) - nanaimo (~> 0.2.6) - xcpretty (0.3.0) - rouge (~> 2.0.7) - xcpretty-travis-formatter (1.0.0) - xcpretty (~> 0.2, >= 0.0.7) - -PLATFORMS - ruby - -DEPENDENCIES - cocoapods (>= 1.7.1, < 2.0.0) - fastlane (~> 2.69) - fastlane-plugin-patch - fastlane-plugin-yarn - travis - -BUNDLED WITH - 2.1.4 From 54cf5e56a86ada7a1c36fb3d7fe40fd8d4ee82e6 Mon Sep 17 00:00:00 2001 From: Jimmy Dee Date: Fri, 27 Mar 2020 13:41:54 -0700 Subject: [PATCH 09/16] update_rnbranch_xcodeproj take one --- fastlane/lib/actions/version_bump.rb | 1 + fastlane/lib/helper/update_helper.rb | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/fastlane/lib/actions/version_bump.rb b/fastlane/lib/actions/version_bump.rb index e84161573..62adff70a 100644 --- a/fastlane/lib/actions/version_bump.rb +++ b/fastlane/lib/actions/version_bump.rb @@ -14,6 +14,7 @@ def run(params) UI.message "Bumping to version #{version}." update_package_json version + update_rnbranch_xcodeproj version update_pods_in_tests_and_examples( repo_update: params[:repo_update], verbose: params[:verbose], diff --git a/fastlane/lib/helper/update_helper.rb b/fastlane/lib/helper/update_helper.rb index 7864fbbf8..5e9463d8d 100644 --- a/fastlane/lib/helper/update_helper.rb +++ b/fastlane/lib/helper/update_helper.rb @@ -1,6 +1,7 @@ require 'cocoapods' require 'fileutils' require 'pathname' +require 'xcodeproj' module UpdateHelper UI = FastlaneCore::UI @@ -135,6 +136,18 @@ def update_pods_in_tests_and_examples(context = nil, end end + def update_rnbranch_xcodeproj(version) + rnbranch_option = %[RNBRANCH_VERSION=@\\"#{version}\\"] + project = Xcodeproj::Project.open '../ios/RNBranch.xcodeproj' + project.build_configurations.each do |config| + options = config['GCC_PREPROCESSOR_DEFINITIONS'] + options = options.reject { |o| o =~ /^RNBRANCH_VERSION=/ } + options << rnbranch_option + config.set_setting 'GCC_PREPROCESSOR_DEFINITIONS', options + end + project.save + end + def update_npm_deps(context, include_examples: false) folders = %w[.] From fab7e5db16e3aa77299f12feac2d99e652025b9b Mon Sep 17 00:00:00 2001 From: Jimmy Dee Date: Fri, 27 Mar 2020 13:42:43 -0700 Subject: [PATCH 10/16] take two --- fastlane/lib/helper/update_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/lib/helper/update_helper.rb b/fastlane/lib/helper/update_helper.rb index 5e9463d8d..cd1678009 100644 --- a/fastlane/lib/helper/update_helper.rb +++ b/fastlane/lib/helper/update_helper.rb @@ -138,7 +138,7 @@ def update_pods_in_tests_and_examples(context = nil, def update_rnbranch_xcodeproj(version) rnbranch_option = %[RNBRANCH_VERSION=@\\"#{version}\\"] - project = Xcodeproj::Project.open '../ios/RNBranch.xcodeproj' + project = Xcodeproj::Project.open 'ios/RNBranch.xcodeproj' project.build_configurations.each do |config| options = config['GCC_PREPROCESSOR_DEFINITIONS'] options = options.reject { |o| o =~ /^RNBRANCH_VERSION=/ } From a4c2273ffd745730b4559181ba5267aea5e7a9c5 Mon Sep 17 00:00:00 2001 From: Jimmy Dee Date: Fri, 27 Mar 2020 13:43:32 -0700 Subject: [PATCH 11/16] take three --- fastlane/lib/helper/update_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/lib/helper/update_helper.rb b/fastlane/lib/helper/update_helper.rb index cd1678009..1b855532d 100644 --- a/fastlane/lib/helper/update_helper.rb +++ b/fastlane/lib/helper/update_helper.rb @@ -140,7 +140,7 @@ def update_rnbranch_xcodeproj(version) rnbranch_option = %[RNBRANCH_VERSION=@\\"#{version}\\"] project = Xcodeproj::Project.open 'ios/RNBranch.xcodeproj' project.build_configurations.each do |config| - options = config['GCC_PREPROCESSOR_DEFINITIONS'] + options = config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] options = options.reject { |o| o =~ /^RNBRANCH_VERSION=/ } options << rnbranch_option config.set_setting 'GCC_PREPROCESSOR_DEFINITIONS', options From 36d30121a995c2261de2842dcc938c035b4db8a1 Mon Sep 17 00:00:00 2001 From: Jimmy Dee Date: Fri, 27 Mar 2020 13:44:52 -0700 Subject: [PATCH 12/16] take four --- fastlane/lib/helper/update_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/lib/helper/update_helper.rb b/fastlane/lib/helper/update_helper.rb index 1b855532d..ffee1e6f5 100644 --- a/fastlane/lib/helper/update_helper.rb +++ b/fastlane/lib/helper/update_helper.rb @@ -143,7 +143,7 @@ def update_rnbranch_xcodeproj(version) options = config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] options = options.reject { |o| o =~ /^RNBRANCH_VERSION=/ } options << rnbranch_option - config.set_setting 'GCC_PREPROCESSOR_DEFINITIONS', options + config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = options end project.save end From cbf00d03f6b5506362e8d0f74aa5be3256d4e436 Mon Sep 17 00:00:00 2001 From: Jimmy Dee Date: Fri, 27 Mar 2020 13:45:27 -0700 Subject: [PATCH 13/16] take five --- fastlane/lib/helper/update_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/fastlane/lib/helper/update_helper.rb b/fastlane/lib/helper/update_helper.rb index ffee1e6f5..4d2da03ae 100644 --- a/fastlane/lib/helper/update_helper.rb +++ b/fastlane/lib/helper/update_helper.rb @@ -141,6 +141,7 @@ def update_rnbranch_xcodeproj(version) project = Xcodeproj::Project.open 'ios/RNBranch.xcodeproj' project.build_configurations.each do |config| options = config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] + options ||= [] options = options.reject { |o| o =~ /^RNBRANCH_VERSION=/ } options << rnbranch_option config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = options From 6340fa7fe3be1c764860eeda47111aac9909ed77 Mon Sep 17 00:00:00 2001 From: Jimmy Dee Date: Fri, 27 Mar 2020 13:45:43 -0700 Subject: [PATCH 14/16] [Fastlane] Version bump to 3.2.1 --- ios/RNBranch.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ios/RNBranch.xcodeproj/project.pbxproj b/ios/RNBranch.xcodeproj/project.pbxproj index 51a12fcb0..f677e959b 100644 --- a/ios/RNBranch.xcodeproj/project.pbxproj +++ b/ios/RNBranch.xcodeproj/project.pbxproj @@ -276,6 +276,7 @@ GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", + "RNBRANCH_VERSION=@\\\"3.2.1\\\"", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; @@ -327,6 +328,7 @@ ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = "RNBRANCH_VERSION=@\\\"3.2.1\\\""; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; From 42dc3aa06d7a40ba5c851cf448919803241856af Mon Sep 17 00:00:00 2001 From: Jimmy Dee Date: Fri, 27 Mar 2020 14:04:02 -0700 Subject: [PATCH 15/16] Cleaner syntax --- fastlane/lib/helper/update_helper.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fastlane/lib/helper/update_helper.rb b/fastlane/lib/helper/update_helper.rb index 4d2da03ae..7c788a3ae 100644 --- a/fastlane/lib/helper/update_helper.rb +++ b/fastlane/lib/helper/update_helper.rb @@ -140,8 +140,7 @@ def update_rnbranch_xcodeproj(version) rnbranch_option = %[RNBRANCH_VERSION=@\\"#{version}\\"] project = Xcodeproj::Project.open 'ios/RNBranch.xcodeproj' project.build_configurations.each do |config| - options = config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] - options ||= [] + options = config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] || [] options = options.reject { |o| o =~ /^RNBRANCH_VERSION=/ } options << rnbranch_option config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = options From 1ba47d74d409709363cbbb606edf40ce78a500d7 Mon Sep 17 00:00:00 2001 From: Jimmy Dee Date: Mon, 30 Mar 2020 16:04:40 -0700 Subject: [PATCH 16/16] Update all Android example apps to use RNBranchModule.getAutoInstance --- .../src/main/java/com/browser_example/MainApplication.java | 4 ++-- .../io/branch/testbed_native_android/MainApplication.java | 4 ++-- .../app/src/main/java/com/testbed_simple/MainApplication.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/browser_example/android/app/src/main/java/com/browser_example/MainApplication.java b/examples/browser_example/android/app/src/main/java/com/browser_example/MainApplication.java index 5e36f483a..b63c77f37 100644 --- a/examples/browser_example/android/app/src/main/java/com/browser_example/MainApplication.java +++ b/examples/browser_example/android/app/src/main/java/com/browser_example/MainApplication.java @@ -8,7 +8,7 @@ import io.branch.rnbranch.RNBranchPackage; import com.reactnativecommunity.webview.RNCWebViewPackage; -import io.branch.referral.Branch; +import io.branch.rnbranch.RNBranchModule; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.react.shell.MainReactPackage; @@ -49,7 +49,7 @@ public ReactNativeHost getReactNativeHost() { public void onCreate() { super.onCreate(); SoLoader.init(this, /* native exopackage */ false); - Branch.getAutoInstance(this); + RNBranchModule.getAutoInstance(this); } @Override diff --git a/examples/testbed_native_android/android/app/src/main/java/io/branch/testbed_native_android/MainApplication.java b/examples/testbed_native_android/android/app/src/main/java/io/branch/testbed_native_android/MainApplication.java index b853422d6..5b386d551 100644 --- a/examples/testbed_native_android/android/app/src/main/java/io/branch/testbed_native_android/MainApplication.java +++ b/examples/testbed_native_android/android/app/src/main/java/io/branch/testbed_native_android/MainApplication.java @@ -4,7 +4,7 @@ import android.support.multidex.MultiDex; import android.support.multidex.MultiDexApplication; -import io.branch.referral.Branch; +import io.branch.rnbranch.RNBranchModule; /** * Created by jdee on 3/30/17. @@ -14,7 +14,7 @@ public class MainApplication extends MultiDexApplication { @Override public void onCreate() { super.onCreate(); - Branch.getAutoInstance(this); + RNBranchModule.getAutoInstance(this); } @Override diff --git a/examples/testbed_simple/android/app/src/main/java/com/testbed_simple/MainApplication.java b/examples/testbed_simple/android/app/src/main/java/com/testbed_simple/MainApplication.java index 289147c43..d9d6a4101 100644 --- a/examples/testbed_simple/android/app/src/main/java/com/testbed_simple/MainApplication.java +++ b/examples/testbed_simple/android/app/src/main/java/com/testbed_simple/MainApplication.java @@ -7,7 +7,7 @@ import com.facebook.react.ReactApplication; import io.branch.rnbranch.RNBranchPackage; -import io.branch.referral.Branch; +import io.branch.rnbranch.RNBranchModule; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.react.shell.MainReactPackage; @@ -47,7 +47,7 @@ public ReactNativeHost getReactNativeHost() { public void onCreate() { super.onCreate(); SoLoader.init(this, /* native exopackage */ false); - Branch.getAutoInstance(this); + RNBranchModule.getAutoInstance(this); } @Override