diff --git a/Example/testHotUpdate/.gitignore b/Example/testHotUpdate/.gitignore index abab531c..ed553545 100644 --- a/Example/testHotUpdate/.gitignore +++ b/Example/testHotUpdate/.gitignore @@ -24,6 +24,7 @@ ios/.xcode.env.local # Android/IntelliJ # +release/ build/ .idea .gradle diff --git a/Example/testHotUpdate/.ruby-version b/Example/testHotUpdate/.ruby-version index 49cdd668..94ff29cc 100644 --- a/Example/testHotUpdate/.ruby-version +++ b/Example/testHotUpdate/.ruby-version @@ -1 +1 @@ -2.7.6 +3.1.1 diff --git a/Example/testHotUpdate/.update b/Example/testHotUpdate/.update new file mode 100644 index 00000000..f30ea174 --- /dev/null +++ b/Example/testHotUpdate/.update @@ -0,0 +1,3 @@ +{ + "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoidXNlciIsInVpZCI6OTQ3NywiZXhwIjoxNjc5MjczODYwOTgzLCJpYXQiOjE2NzY2ODE4NjB9.RtoiYnN_2hJ6-aRsx6JkRWil0-RxkdpL7yD7koAky8E" +} \ No newline at end of file diff --git a/Example/testHotUpdate/Gemfile.lock b/Example/testHotUpdate/Gemfile.lock index e1f90007..0c1a8604 100644 --- a/Example/testHotUpdate/Gemfile.lock +++ b/Example/testHotUpdate/Gemfile.lock @@ -91,10 +91,10 @@ PLATFORMS ruby DEPENDENCIES - cocoapods (~> 1.11, >= 1.11.2) + cocoapods (~> 1.11, >= 1.11.3) RUBY VERSION - ruby 2.7.4p191 + ruby 3.1.1p18 BUNDLED WITH 2.2.27 diff --git a/Example/testHotUpdate/android/app/_BUCK b/Example/testHotUpdate/android/app/_BUCK deleted file mode 100644 index bd8029c7..00000000 --- a/Example/testHotUpdate/android/app/_BUCK +++ /dev/null @@ -1,55 +0,0 @@ -# To learn about Buck see [Docs](https://buckbuild.com/). -# To run your application with Buck: -# - install Buck -# - `npm start` - to start the packager -# - `cd android` -# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` -# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck -# - `buck install -r android/app` - compile, install and run application -# - -load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") - -lib_deps = [] - -create_aar_targets(glob(["libs/*.aar"])) - -create_jar_targets(glob(["libs/*.jar"])) - -android_library( - name = "all-libs", - exported_deps = lib_deps, -) - -android_library( - name = "app-code", - srcs = glob([ - "src/main/java/**/*.java", - ]), - deps = [ - ":all-libs", - ":build_config", - ":res", - ], -) - -android_build_config( - name = "build_config", - package = "com.testhotupdate", -) - -android_resource( - name = "res", - package = "com.testhotupdate", - res = "src/main/res", -) - -android_binary( - name = "app", - keystore = "//android/keystores:debug", - manifest = "src/main/AndroidManifest.xml", - package_type = "debug", - deps = [ - ":app-code", - ], -) diff --git a/Example/testHotUpdate/android/app/build.gradle b/Example/testHotUpdate/android/app/build.gradle index fbd443c3..4070373c 100644 --- a/Example/testHotUpdate/android/app/build.gradle +++ b/Example/testHotUpdate/android/app/build.gradle @@ -167,4 +167,4 @@ dependencies { } } -apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) \ No newline at end of file +apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) diff --git a/Example/testHotUpdate/android/app/src/debug/java/com/testhotupdate/ReactNativeFlipper.java b/Example/testHotUpdate/android/app/src/debug/java/com/testhotupdate/ReactNativeFlipper.java index 44b9651d..2a7f9f93 100644 --- a/Example/testHotUpdate/android/app/src/debug/java/com/testhotupdate/ReactNativeFlipper.java +++ b/Example/testHotUpdate/android/app/src/debug/java/com/testhotupdate/ReactNativeFlipper.java @@ -72,4 +72,4 @@ public void run() { } } } -} \ No newline at end of file +} diff --git a/Example/testHotUpdate/android/app/src/main/java/com/testhotupdate/MainApplication.java b/Example/testHotUpdate/android/app/src/main/java/com/testhotupdate/MainApplication.java index 3db55aef..f2b6a7bf 100644 --- a/Example/testHotUpdate/android/app/src/main/java/com/testhotupdate/MainApplication.java +++ b/Example/testHotUpdate/android/app/src/main/java/com/testhotupdate/MainApplication.java @@ -9,16 +9,17 @@ import com.facebook.react.defaults.DefaultReactNativeHost; import com.facebook.soloader.SoLoader; import java.util.List; + import cn.reactnative.modules.update.UpdateContext; + public class MainApplication extends Application implements ReactApplication { private final ReactNativeHost mReactNativeHost = new DefaultReactNativeHost(this) { - @Override - protected String getJSBundleFile() { - return UpdateContext.getBundleUrl(MainApplication.this); - } - + @Override + protected String getJSBundleFile() { + return UpdateContext.getBundleUrl(MainApplication.this); + } @Override public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; @@ -64,4 +65,4 @@ public void onCreate() { } ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); } -} \ No newline at end of file +} diff --git a/Example/testHotUpdate/android/build.gradle b/Example/testHotUpdate/android/build.gradle index ba992627..67d887b0 100644 --- a/Example/testHotUpdate/android/build.gradle +++ b/Example/testHotUpdate/android/build.gradle @@ -18,4 +18,4 @@ buildscript { classpath("com.android.tools.build:gradle:7.3.1") classpath("com.facebook.react:react-native-gradle-plugin") } -} \ No newline at end of file +} diff --git a/Example/testHotUpdate/android/gradle/wrapper/gradle-wrapper.jar b/Example/testHotUpdate/android/gradle/wrapper/gradle-wrapper.jar index 7454180f..41d9927a 100644 Binary files a/Example/testHotUpdate/android/gradle/wrapper/gradle-wrapper.jar and b/Example/testHotUpdate/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/Example/testHotUpdate/ios/.xcode.env b/Example/testHotUpdate/ios/.xcode.env index 9d643e97..3d5782c7 100644 --- a/Example/testHotUpdate/ios/.xcode.env +++ b/Example/testHotUpdate/ios/.xcode.env @@ -2,9 +2,10 @@ # used when running script phases inside Xcode. # To customize your local environment, you can create an `.xcode.env.local` # file that is not versioned. + # NODE_BINARY variable contains the PATH to the node executable. # # Customize the NODE_BINARY variable here. # For example, to use nvm with brew, add the following line # . "$(brew --prefix nvm)/nvm.sh" --no-use -export NODE_BINARY=$(command -v node) \ No newline at end of file +export NODE_BINARY=$(command -v node) diff --git a/Example/testHotUpdate/ios/Podfile b/Example/testHotUpdate/ios/Podfile index 1c55fa0b..22927e86 100644 --- a/Example/testHotUpdate/ios/Podfile +++ b/Example/testHotUpdate/ios/Podfile @@ -57,4 +57,4 @@ target 'testHotupdate' do ) __apply_Xcode_12_5_M1_post_install_workaround(installer) end -end \ No newline at end of file +end diff --git a/Example/testHotUpdate/ios/Podfile.lock b/Example/testHotUpdate/ios/Podfile.lock index a20d6d6b..173fd62a 100644 --- a/Example/testHotUpdate/ios/Podfile.lock +++ b/Example/testHotUpdate/ios/Podfile.lock @@ -89,6 +89,11 @@ PODS: - DoubleConversion - fmt (~> 6.2.1) - glog + - RCT-Folly/Fabric (2021.07.22.00): + - boost + - DoubleConversion + - fmt (~> 6.2.1) + - glog - RCT-Folly/Futures (2021.07.22.00): - boost - DoubleConversion @@ -121,8 +126,10 @@ PODS: - RCTRequired - RCTTypeSafety - React-Core + - React-graphics - React-jsi - React-jsiexecutor + - React-rncore - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - React-Core (0.71.1): @@ -271,6 +278,326 @@ PODS: - React-logger (= 0.71.1) - React-perflogger (= 0.71.1) - React-runtimeexecutor (= 0.71.1) + - React-Fabric (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-Fabric/animations (= 0.71.1) + - React-Fabric/attributedstring (= 0.71.1) + - React-Fabric/butter (= 0.71.1) + - React-Fabric/componentregistry (= 0.71.1) + - React-Fabric/componentregistrynative (= 0.71.1) + - React-Fabric/components (= 0.71.1) + - React-Fabric/config (= 0.71.1) + - React-Fabric/core (= 0.71.1) + - React-Fabric/debug_core (= 0.71.1) + - React-Fabric/debug_renderer (= 0.71.1) + - React-Fabric/imagemanager (= 0.71.1) + - React-Fabric/leakchecker (= 0.71.1) + - React-Fabric/mapbuffer (= 0.71.1) + - React-Fabric/mounting (= 0.71.1) + - React-Fabric/runtimescheduler (= 0.71.1) + - React-Fabric/scheduler (= 0.71.1) + - React-Fabric/telemetry (= 0.71.1) + - React-Fabric/templateprocessor (= 0.71.1) + - React-Fabric/textlayoutmanager (= 0.71.1) + - React-Fabric/uimanager (= 0.71.1) + - React-Fabric/utils (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/animations (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/attributedstring (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/butter (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/componentregistry (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/componentregistrynative (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/components (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-Fabric/components/activityindicator (= 0.71.1) + - React-Fabric/components/image (= 0.71.1) + - React-Fabric/components/inputaccessory (= 0.71.1) + - React-Fabric/components/legacyviewmanagerinterop (= 0.71.1) + - React-Fabric/components/modal (= 0.71.1) + - React-Fabric/components/root (= 0.71.1) + - React-Fabric/components/safeareaview (= 0.71.1) + - React-Fabric/components/scrollview (= 0.71.1) + - React-Fabric/components/slider (= 0.71.1) + - React-Fabric/components/text (= 0.71.1) + - React-Fabric/components/textinput (= 0.71.1) + - React-Fabric/components/unimplementedview (= 0.71.1) + - React-Fabric/components/view (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/components/activityindicator (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/components/image (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/components/inputaccessory (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/components/legacyviewmanagerinterop (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/components/modal (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/components/root (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/components/safeareaview (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/components/scrollview (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/components/slider (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/components/text (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/components/textinput (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/components/unimplementedview (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/components/view (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - Yoga + - React-Fabric/config (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/core (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/debug_core (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/debug_renderer (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/imagemanager (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - React-RCTImage (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/leakchecker (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/mapbuffer (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/mounting (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/runtimescheduler (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/scheduler (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/telemetry (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/templateprocessor (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/textlayoutmanager (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-Fabric/uimanager + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/uimanager (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-Fabric/utils (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - RCTRequired (= 0.71.1) + - RCTTypeSafety (= 0.71.1) + - React-graphics (= 0.71.1) + - React-jsi (= 0.71.1) + - React-jsiexecutor (= 0.71.1) + - ReactCommon/turbomodule/core (= 0.71.1) + - React-graphics (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - React-Core/Default (= 0.71.1) - React-hermes (0.71.1): - DoubleConversion - glog @@ -297,16 +624,34 @@ PODS: - React-jsinspector (0.71.1) - React-logger (0.71.1): - glog - - react-native-update (8.1.0): + - react-native-update (9.1.0): + - RCT-Folly (= 2021.07.22.00) + - RCTRequired + - RCTTypeSafety - React - - react-native-update/HDiffPatch (= 8.1.0) - - react-native-update/RCTPushy (= 8.1.0) + - React-Codegen + - React-Core + - react-native-update/HDiffPatch (= 9.1.0) + - react-native-update/RCTPushy (= 9.1.0) + - ReactCommon/turbomodule/core - SSZipArchive - - react-native-update/HDiffPatch (8.1.0): + - react-native-update/HDiffPatch (9.1.0): + - RCT-Folly (= 2021.07.22.00) + - RCTRequired + - RCTTypeSafety - React + - React-Codegen + - React-Core + - ReactCommon/turbomodule/core - SSZipArchive - - react-native-update/RCTPushy (8.1.0): + - react-native-update/RCTPushy (9.1.0): + - RCT-Folly (= 2021.07.22.00) + - RCTRequired + - RCTTypeSafety - React + - React-Codegen + - React-Core + - ReactCommon/turbomodule/core - SSZipArchive - React-perflogger (0.71.1) - React-RCTActionSheet (0.71.1): @@ -323,6 +668,8 @@ PODS: - RCTRequired - RCTTypeSafety - React-Core + - React-graphics + - React-RCTFabric - ReactCommon/turbomodule/core - React-RCTBlob (0.71.1): - RCT-Folly (= 2021.07.22.00) @@ -332,6 +679,11 @@ PODS: - React-jsi (= 0.71.1) - React-RCTNetwork (= 0.71.1) - ReactCommon/turbomodule/core (= 0.71.1) + - React-RCTFabric (0.71.1): + - RCT-Folly/Fabric (= 2021.07.22.00) + - React-Core (= 0.71.1) + - React-Fabric (= 0.71.1) + - React-RCTImage (= 0.71.1) - React-RCTImage (0.71.1): - RCT-Folly (= 2021.07.22.00) - RCTTypeSafety (= 0.71.1) @@ -367,6 +719,7 @@ PODS: - React-Core/RCTVibrationHeaders (= 0.71.1) - React-jsi (= 0.71.1) - ReactCommon/turbomodule/core (= 0.71.1) + - React-rncore (0.71.1) - React-runtimeexecutor (0.71.1): - React-jsi (= 0.71.1) - ReactCommon/turbomodule/bridging (0.71.1): @@ -426,6 +779,7 @@ DEPENDENCIES: - libevent (~> 2.1.12) - OpenSSL-Universal (= 1.1.1100) - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) + - RCT-Folly/Fabric (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) - React (from `../node_modules/react-native/`) @@ -436,6 +790,8 @@ DEPENDENCIES: - React-Core/RCTWebSocket (from `../node_modules/react-native/`) - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) + - React-Fabric (from `../node_modules/react-native/ReactCommon`) + - React-graphics (from `../node_modules/react-native/ReactCommon/react/renderer/graphics`) - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`) - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) @@ -447,12 +803,14 @@ DEPENDENCIES: - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) - React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`) - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) + - React-RCTFabric (from `../node_modules/react-native/React`) - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) - React-RCTText (from `../node_modules/react-native/Libraries/Text`) - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) + - React-rncore (from `../node_modules/react-native/ReactCommon`) - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) @@ -507,6 +865,10 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/React/CoreModules" React-cxxreact: :path: "../node_modules/react-native/ReactCommon/cxxreact" + React-Fabric: + :path: "../node_modules/react-native/ReactCommon" + React-graphics: + :path: "../node_modules/react-native/ReactCommon/react/renderer/graphics" React-hermes: :path: "../node_modules/react-native/ReactCommon/hermes" React-jsi: @@ -529,6 +891,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/Libraries/AppDelegate" React-RCTBlob: :path: "../node_modules/react-native/Libraries/Blob" + React-RCTFabric: + :path: "../node_modules/react-native/React" React-RCTImage: :path: "../node_modules/react-native/Libraries/Image" React-RCTLinking: @@ -541,6 +905,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/Libraries/Text" React-RCTVibration: :path: "../node_modules/react-native/Libraries/Vibration" + React-rncore: + :path: "../node_modules/react-native/ReactCommon" React-runtimeexecutor: :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" ReactCommon: @@ -549,11 +915,11 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: - boost: a7c83b31436843459a1961bfd74b96033dc77234 + boost: 57d2868c099736d80fcd648bf211b4431e51a558 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 - DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 + DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 FBLazyVector: ad72713385db5289b19f1ead07e8e4aa26dcb01d - FBReactNativeSpec: df2602c11e33d310433496e28a48b4b2be652a61 + FBReactNativeSpec: 06fc2a521838dc240b499699d43467b071c66908 Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0 Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 @@ -564,7 +930,7 @@ SPEC CHECKSUMS: Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541 FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 - glog: 476ee3e89abb49e07f822b48323c51c57124b572 + glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b hermes-engine: 922ccd744f50d9bfde09e9677bf0f3b562ea5fb9 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c @@ -573,27 +939,31 @@ SPEC CHECKSUMS: RCTTypeSafety: c276d85975bde3d8448907235c70bf0da257adfd React: e481a67971af1ce9639c9f746b753dd0e84ca108 React-callinvoker: 1051c04a94fa9d243786b86380606bad701a3b31 - React-Codegen: 14b1e716d361d5ad95e0ce1a338f3fa0733a98b5 + React-Codegen: d4bc58865453b6a797405aa99f9fa1da3c9e58c6 React-Core: 698fc3baecb80d511d987475a16d036cec6d287f React-CoreModules: 59245305f41ff0adfeac334acc0594dea4585a7c React-cxxreact: 49accd2954b0f532805dbcd1918fa6962f32f247 + React-Fabric: 30982dc19c7511bedf1751b0a0c21a5b816e2a3e + React-graphics: beabc29b026e7472ced1482557effedd15a09cf1 React-hermes: d068733294581a085e95b6024e8d951b005e26d3 React-jsi: 122b9bce14f4c6c7cb58f28f87912cfe091885fa React-jsiexecutor: 60cf272aababc5212410e4249d17cea14fc36caa React-jsinspector: ff56004b0c974b688a6548c156d5830ad751ae07 React-logger: 60a0b5f8bed667ecf9e24fecca1f30d125de6d75 - react-native-update: 394b7f52ed3c0688d12084f3fb47d49504131be6 + react-native-update: b9d44d250953e61f1b42c22fa4d585a6bb5dd4d6 React-perflogger: ec8eef2a8f03ecfa6361c2c5fb9197ef4a29cc85 React-RCTActionSheet: a0c023b86cf4c862fa9c4eb0f6f91fbe878fb2de React-RCTAnimation: 168d53718c74153947c0109f55900faa64d79439 - React-RCTAppDelegate: a8efbab128b34aa07a9491c85a41401210b1bec5 + React-RCTAppDelegate: 5f34addd2f9d8c542c129b562b7f3db0cc599a3d React-RCTBlob: 9bcbfc893bfda9f6b2eb016329d38c0f6366d31a + React-RCTFabric: cec4e89720e8778aa132e5515be1af251d2e9b6a React-RCTImage: 3fcd4570b4b0f1ac2f4b4b6308dba33ce66c5b50 React-RCTLinking: 1edb8e1bb3fc39bf9e13c63d6aaaa3f0c3d18683 React-RCTNetwork: 500a79e0e0f67678077df727fabba87a55c043e1 React-RCTSettings: cc4414eb84ad756d619076c3999fecbf12896d6f React-RCTText: 2a34261f3da6e34f47a62154def657546ebfa5e1 React-RCTVibration: 49d531ec8498e0afa2c9b22c2205784372e3d4f3 + React-rncore: b802bc9f6985c482127b066c869999a09d25edeb React-runtimeexecutor: 311feb67600774723fe10eb8801d3138cae9ad67 ReactCommon: 03be76588338a27a88d103b35c3c44a3fd43d136 SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 @@ -601,6 +971,6 @@ SPEC CHECKSUMS: Yoga: 921eb014669cf9c718ada68b08d362517d564e0c YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 640d0fbc8653c12b1d7121eae0169fad3d42517e +PODFILE CHECKSUM: 3a4760d7ec3a6ffc7497e8723f29129170c8dc0d COCOAPODS: 1.11.3 diff --git a/Example/testHotUpdate/ios/testHotUpdate.xcodeproj/project.pbxproj b/Example/testHotUpdate/ios/testHotUpdate.xcodeproj/project.pbxproj index 904a44fc..8afff61a 100644 --- a/Example/testHotUpdate/ios/testHotUpdate.xcodeproj/project.pbxproj +++ b/Example/testHotUpdate/ios/testHotUpdate.xcodeproj/project.pbxproj @@ -12,8 +12,8 @@ 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 7699B88040F8A987B510C191 /* libPods-testHotupdate-testHotupdateTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-testHotupdate-testHotupdateTests.a */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; - 983131D2EBAB94EBB6700C34 /* libPods-testHotupdate-testHotupdateTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 59B080016B9F7992256D7BCD /* libPods-testHotupdate-testHotupdateTests.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -36,13 +36,13 @@ 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = testHotupdate/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = testHotupdate/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = testHotupdate/main.m; sourceTree = ""; }; - 35A33350B5D9A46B028EB31B /* Pods-testHotupdate-testHotupdateTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-testHotupdate-testHotupdateTests.release.xcconfig"; path = "Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests.release.xcconfig"; sourceTree = ""; }; + 19F6CBCC0A4E27FBF8BF4A61 /* libPods-testHotupdate-testHotupdateTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-testHotupdate-testHotupdateTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 3B4392A12AC88292D35C810B /* Pods-testHotupdate.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-testHotupdate.debug.xcconfig"; path = "Target Support Files/Pods-testHotupdate/Pods-testHotupdate.debug.xcconfig"; sourceTree = ""; }; - 404B8A109FF0E52B839C8687 /* Pods-testHotupdate-testHotupdateTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-testHotupdate-testHotupdateTests.debug.xcconfig"; path = "Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests.debug.xcconfig"; sourceTree = ""; }; 5709B34CF0A7D63546082F79 /* Pods-testHotupdate.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-testHotupdate.release.xcconfig"; path = "Target Support Files/Pods-testHotupdate/Pods-testHotupdate.release.xcconfig"; sourceTree = ""; }; - 59B080016B9F7992256D7BCD /* libPods-testHotupdate-testHotupdateTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-testHotupdate-testHotupdateTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 5B7EB9410499542E8C5724F5 /* Pods-testHotupdate-testHotupdateTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-testHotupdate-testHotupdateTests.debug.xcconfig"; path = "Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests.debug.xcconfig"; sourceTree = ""; }; 5DCACB8F33CDC322A6C60F78 /* libPods-testHotupdate.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-testHotupdate.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = testHotupdate/LaunchScreen.storyboard; sourceTree = ""; }; + 89C6BE57DB24E9ADA2F236DE /* Pods-testHotupdate-testHotupdateTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-testHotupdate-testHotupdateTests.release.xcconfig"; path = "Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests.release.xcconfig"; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ @@ -51,7 +51,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 983131D2EBAB94EBB6700C34 /* libPods-testHotupdate-testHotupdateTests.a in Frameworks */, + 7699B88040F8A987B510C191 /* libPods-testHotupdate-testHotupdateTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -101,7 +101,7 @@ children = ( ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 5DCACB8F33CDC322A6C60F78 /* libPods-testHotupdate.a */, - 59B080016B9F7992256D7BCD /* libPods-testHotupdate-testHotupdateTests.a */, + 19F6CBCC0A4E27FBF8BF4A61 /* libPods-testHotupdate-testHotupdateTests.a */, ); name = Frameworks; sourceTree = ""; @@ -142,8 +142,8 @@ children = ( 3B4392A12AC88292D35C810B /* Pods-testHotupdate.debug.xcconfig */, 5709B34CF0A7D63546082F79 /* Pods-testHotupdate.release.xcconfig */, - 404B8A109FF0E52B839C8687 /* Pods-testHotupdate-testHotupdateTests.debug.xcconfig */, - 35A33350B5D9A46B028EB31B /* Pods-testHotupdate-testHotupdateTests.release.xcconfig */, + 5B7EB9410499542E8C5724F5 /* Pods-testHotupdate-testHotupdateTests.debug.xcconfig */, + 89C6BE57DB24E9ADA2F236DE /* Pods-testHotupdate-testHotupdateTests.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -155,12 +155,12 @@ isa = PBXNativeTarget; buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "testHotupdateTests" */; buildPhases = ( - DC20F2927A7E6CA06E8D485C /* [CP] Check Pods Manifest.lock */, + A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */, 00E356EA1AD99517003FC87E /* Sources */, 00E356EB1AD99517003FC87E /* Frameworks */, 00E356EC1AD99517003FC87E /* Resources */, - 4C7F70F5C06F7BFA31EE8610 /* [CP] Embed Pods Frameworks */, - BC2CDA870086B299A0FA004A /* [CP] Copy Pods Resources */, + C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */, + F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -256,13 +256,15 @@ files = ( ); inputPaths = ( + "$(SRCROOT)/.xcode.env.local", + "$(SRCROOT)/.xcode.env", ); name = "Bundle React Native code and images"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "set -e\n\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; + shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; }; 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; @@ -281,38 +283,26 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-testHotupdate/Pods-testHotupdate-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 4C7F70F5C06F7BFA31EE8610 /* [CP] Embed Pods Frameworks */ = { + A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - BC2CDA870086B299A0FA004A /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests-resources-${CONFIGURATION}-input-files.xcfilelist", + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Copy Pods Resources"; + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-testHotupdate-testHotupdateTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests-resources.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { @@ -337,26 +327,21 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - DC20F2927A7E6CA06E8D485C /* [CP] Check Pods Manifest.lock */ = { + C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-testHotupdate-testHotupdateTests-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { @@ -376,6 +361,23 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-testHotupdate/Pods-testHotupdate-resources.sh\"\n"; showEnvVarsInLog = 0; }; + F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; FD10A7F022414F080027D42C /* Start Packager */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -428,7 +430,7 @@ /* Begin XCBuildConfiguration section */ 00E356F61AD99517003FC87E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 404B8A109FF0E52B839C8687 /* Pods-testHotupdate-testHotupdateTests.debug.xcconfig */; + baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-testHotupdate-testHotupdateTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -436,7 +438,7 @@ "$(inherited)", ); INFOPLIST_FILE = testHotupdateTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -455,12 +457,12 @@ }; 00E356F71AD99517003FC87E /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 35A33350B5D9A46B028EB31B /* Pods-testHotupdate-testHotupdateTests.release.xcconfig */; + baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-testHotupdate-testHotupdateTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; INFOPLIST_FILE = testHotupdateTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -490,6 +492,7 @@ "$(inherited)", "@executable_path/Frameworks", ); + MARKETING_VERSION = 1.0; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -515,6 +518,7 @@ "$(inherited)", "@executable_path/Frameworks", ); + MARKETING_VERSION = 1.0; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -576,7 +580,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; LD_RUNPATH_SEARCH_PATHS = ( /usr/lib/swift, "$(inherited)", @@ -641,7 +645,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; LD_RUNPATH_SEARCH_PATHS = ( /usr/lib/swift, "$(inherited)", diff --git a/Example/testHotUpdate/ios/testHotUpdate.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/testHotUpdate/ios/testHotUpdate.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/Example/testHotUpdate/ios/testHotUpdate.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/testHotUpdate/ios/testHotUpdate/AppDelegate.h b/Example/testHotUpdate/ios/testHotUpdate/AppDelegate.h index 3713cad8..5d280825 100644 --- a/Example/testHotUpdate/ios/testHotUpdate/AppDelegate.h +++ b/Example/testHotUpdate/ios/testHotUpdate/AppDelegate.h @@ -3,4 +3,4 @@ @interface AppDelegate : RCTAppDelegate -@end \ No newline at end of file +@end diff --git a/Example/testHotUpdate/ios/testHotUpdate/AppDelegate.mm b/Example/testHotUpdate/ios/testHotUpdate/AppDelegate.mm index 55d75cd3..51830ec5 100644 --- a/Example/testHotUpdate/ios/testHotUpdate/AppDelegate.mm +++ b/Example/testHotUpdate/ios/testHotUpdate/AppDelegate.mm @@ -35,4 +35,4 @@ - (BOOL)concurrentRootEnabled return true; } -@end \ No newline at end of file +@end diff --git a/Example/testHotUpdate/ios/testHotUpdate/Info.plist b/Example/testHotUpdate/ios/testHotUpdate/Info.plist index 40c49ce1..508c4ae4 100644 --- a/Example/testHotUpdate/ios/testHotUpdate/Info.plist +++ b/Example/testHotUpdate/ios/testHotUpdate/Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0 + $(MARKETING_VERSION) CFBundleSignature ???? CFBundleVersion - 1 + $(CURRENT_PROJECT_VERSION) LSRequiresIPhoneOS NSAppTransportSecurity diff --git a/Example/testHotUpdate/yarn.lock b/Example/testHotUpdate/yarn.lock index 7ce37b9b..1eb0b1d7 100644 --- a/Example/testHotUpdate/yarn.lock +++ b/Example/testHotUpdate/yarn.lock @@ -17,7 +17,7 @@ dependencies: "@babel/highlight" "^7.18.6" -"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.17.10", "@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.1", "@babel/compat-data@^7.20.5": +"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.1", "@babel/compat-data@^7.20.5": version "7.20.10" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.10.tgz#9d92fa81b87542fff50e848ed585b4212c1d34ec" integrity sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg== @@ -76,7 +76,7 @@ "@babel/helper-explode-assignable-expression" "^7.18.6" "@babel/types" "^7.18.9" -"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.16.7", "@babel/helper-compilation-targets@^7.17.10", "@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.0", "@babel/helper-compilation-targets@^7.20.7": +"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.0", "@babel/helper-compilation-targets@^7.20.7": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz#a6cd33e93629f5eb473b021aac05df62c4cd09bb" integrity sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ== @@ -87,7 +87,7 @@ lru-cache "^5.1.1" semver "^6.3.0" -"@babel/helper-create-class-features-plugin@^7.17.12", "@babel/helper-create-class-features-plugin@^7.18.0", "@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.20.5", "@babel/helper-create-class-features-plugin@^7.20.7": +"@babel/helper-create-class-features-plugin@^7.18.0", "@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.20.5", "@babel/helper-create-class-features-plugin@^7.20.7": version "7.20.12" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.12.tgz#4349b928e79be05ed2d1643b20b99bb87c503819" integrity sha512-9OunRkbT0JQcednL0UFvbfXpAsUXiGjUk0a7sN8fUXX7Mue79cUSMjHGDRRi/Vz9vYlpIhLV5fMD5dKoMhhsNQ== @@ -101,7 +101,7 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" "@babel/helper-split-export-declaration" "^7.18.6" -"@babel/helper-create-regexp-features-plugin@^7.16.7", "@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.20.5": +"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.20.5": version "7.20.5" resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.20.5.tgz#5ea79b59962a09ec2acf20a963a01ab4d076ccca" integrity sha512-m68B1lkg3XDGX5yCvGO0kPx3v9WIYLnzjKfPcQiwntEQa5ZeRkPmo2X/ISJc8qxWGfwUr+kvZAeEzAwLec2r2w== @@ -121,7 +121,7 @@ resolve "^1.14.2" semver "^6.1.2" -"@babel/helper-environment-visitor@^7.16.7", "@babel/helper-environment-visitor@^7.18.2", "@babel/helper-environment-visitor@^7.18.9": +"@babel/helper-environment-visitor@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== @@ -133,7 +133,7 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-function-name@^7.16.7", "@babel/helper-function-name@^7.17.9", "@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.19.0": +"@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.19.0": version "7.19.0" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c" integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== @@ -148,21 +148,21 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-member-expression-to-functions@^7.17.7", "@babel/helper-member-expression-to-functions@^7.20.7": +"@babel/helper-member-expression-to-functions@^7.20.7": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.20.7.tgz#a6f26e919582275a93c3aa6594756d71b0bb7f05" integrity sha512-9J0CxJLq315fEdi4s7xK5TQaNYjZw+nDVpVqr1axNGKzdrdwYBD5b4uKv3n75aABG0rCCTK8Im8Ww7eYfMrZgw== dependencies: "@babel/types" "^7.20.7" -"@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.16.7", "@babel/helper-module-imports@^7.18.6": +"@babel/helper-module-imports@^7.16.7", "@babel/helper-module-imports@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== dependencies: "@babel/types" "^7.18.6" -"@babel/helper-module-transforms@^7.18.0", "@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.20.11": +"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.20.11": version "7.20.11" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz#df4c7af713c557938c50ea3ad0117a7944b2f1b0" integrity sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg== @@ -176,19 +176,19 @@ "@babel/traverse" "^7.20.10" "@babel/types" "^7.20.7" -"@babel/helper-optimise-call-expression@^7.16.7", "@babel/helper-optimise-call-expression@^7.18.6": +"@babel/helper-optimise-call-expression@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== dependencies: "@babel/types" "^7.18.6" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.17.12", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.17.12", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": version "7.20.2" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz#d1b9000752b18d0877cff85a5c376ce5c3121629" integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ== -"@babel/helper-remap-async-to-generator@^7.16.8", "@babel/helper-remap-async-to-generator@^7.18.9": +"@babel/helper-remap-async-to-generator@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz#997458a0e3357080e54e1d79ec347f8a8cd28519" integrity sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA== @@ -198,7 +198,7 @@ "@babel/helper-wrap-function" "^7.18.9" "@babel/types" "^7.18.9" -"@babel/helper-replace-supers@^7.16.7", "@babel/helper-replace-supers@^7.18.2", "@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.20.7": +"@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.20.7": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.20.7.tgz#243ecd2724d2071532b2c8ad2f0f9f083bcae331" integrity sha512-vujDMtB6LVfNW13jhlCrp48QNslK6JXi7lQG736HVbHz/mbf4Dc7tIRh1Xf5C0rF7BP8iiSxGMCmY6Ci1ven3A== @@ -210,21 +210,21 @@ "@babel/traverse" "^7.20.7" "@babel/types" "^7.20.7" -"@babel/helper-simple-access@^7.18.2", "@babel/helper-simple-access@^7.20.2": +"@babel/helper-simple-access@^7.20.2": version "7.20.2" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9" integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA== dependencies: "@babel/types" "^7.20.2" -"@babel/helper-skip-transparent-expression-wrappers@^7.16.0", "@babel/helper-skip-transparent-expression-wrappers@^7.20.0": +"@babel/helper-skip-transparent-expression-wrappers@^7.20.0": version "7.20.0" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz#fbe4c52f60518cab8140d77101f0e63a8a230684" integrity sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg== dependencies: "@babel/types" "^7.20.0" -"@babel/helper-split-export-declaration@^7.16.7", "@babel/helper-split-export-declaration@^7.18.6": +"@babel/helper-split-export-declaration@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== @@ -758,7 +758,7 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/helper-replace-supers" "^7.18.6" -"@babel/plugin-transform-parameters@^7.0.0", "@babel/plugin-transform-parameters@^7.17.12", "@babel/plugin-transform-parameters@^7.20.1", "@babel/plugin-transform-parameters@^7.20.7": +"@babel/plugin-transform-parameters@^7.0.0", "@babel/plugin-transform-parameters@^7.20.1", "@babel/plugin-transform-parameters@^7.20.7": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.7.tgz#0ee349e9d1bc96e78e3b37a7af423a4078a7083f" integrity sha512-WiWBIkeHKVOSYPO0pWkxGPfKeWrCJyD3NJ53+Lrp/QMSZbsVPovrVl2aWZ19D/LTVnaDv5Ap7GJ/B2CTOZdrfA== @@ -1028,7 +1028,7 @@ "@babel/parser" "^7.20.7" "@babel/types" "^7.20.7" -"@babel/traverse@^7.13.0", "@babel/traverse@^7.18.2", "@babel/traverse@^7.20.0", "@babel/traverse@^7.20.10", "@babel/traverse@^7.20.12", "@babel/traverse@^7.20.13", "@babel/traverse@^7.20.5", "@babel/traverse@^7.20.7", "@babel/traverse@^7.7.2", "@babel/traverse@^7.7.4": +"@babel/traverse@^7.20.0", "@babel/traverse@^7.20.10", "@babel/traverse@^7.20.12", "@babel/traverse@^7.20.13", "@babel/traverse@^7.20.5", "@babel/traverse@^7.20.7", "@babel/traverse@^7.7.2", "@babel/traverse@^7.7.4": version "7.20.13" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.13.tgz#817c1ba13d11accca89478bd5481b2d168d07473" integrity sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ== @@ -1044,7 +1044,7 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.17.0", "@babel/types@^7.17.12", "@babel/types@^7.18.2", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": +"@babel/types@^7.0.0", "@babel/types@^7.17.12", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.7.tgz#54ec75e252318423fc07fb644dc6a58a64c09b7f" integrity sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg== @@ -1358,7 +1358,7 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/resolve-uri@3.1.0", "@jridgewell/resolve-uri@^3.0.3": +"@jridgewell/resolve-uri@3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== @@ -2117,13 +2117,6 @@ babel-jest@^29.2.1, babel-jest@^29.4.0: graceful-fs "^4.2.9" slash "^3.0.0" -babel-plugin-dynamic-import-node@^2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" - integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== - dependencies: - object.assign "^4.1.0" - babel-plugin-istanbul@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" @@ -2311,7 +2304,7 @@ braces@^3.0.2: dependencies: fill-range "^7.0.1" -browserslist@^4.20.3, browserslist@^4.21.3, browserslist@^4.21.4: +browserslist@^4.21.3, browserslist@^4.21.4: version "4.21.4" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.4.tgz#e7496bbc67b9e39dd0f98565feccdcb0d4ff6987" integrity sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw== @@ -2875,7 +2868,7 @@ errorhandler@^1.5.0: accepts "~1.3.7" escape-html "~1.0.3" -es-abstract@^1.19.0, es-abstract@^1.19.5, es-abstract@^1.20.4: +es-abstract@^1.19.0, es-abstract@^1.20.4: version "1.21.1" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.1.tgz#e6105a099967c08377830a0c9cb589d570dd86c6" integrity sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg== @@ -3460,7 +3453,7 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: version "1.2.0" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q== @@ -3600,7 +3593,7 @@ has-proto@^1.0.1: resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== -has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3: +has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== @@ -3816,12 +3809,12 @@ is-buffer@^1.1.5: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.4, is-callable@^1.2.7: +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-core-module@^2.8.1, is-core-module@^2.9.0: +is-core-module@^2.9.0: version "2.11.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== @@ -5290,7 +5283,7 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.12.0, object-inspect@^1.12.2, object-inspect@^1.9.0: +object-inspect@^1.12.2, object-inspect@^1.9.0: version "1.12.3" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== @@ -5307,7 +5300,7 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@^4.1.0, object.assign@^4.1.2, object.assign@^4.1.4: +object.assign@^4.1.2, object.assign@^4.1.4: version "4.1.4" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== @@ -6038,11 +6031,6 @@ scheduler@^0.23.0: dependencies: loose-envify "^1.1.0" -semver@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" - integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== - semver@^5.5.0, semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" @@ -6345,7 +6333,7 @@ string.prototype.matchall@^4.0.8: regexp.prototype.flags "^1.4.3" side-channel "^1.0.4" -string.prototype.trimend@^1.0.5, string.prototype.trimend@^1.0.6: +string.prototype.trimend@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== @@ -6354,7 +6342,7 @@ string.prototype.trimend@^1.0.5, string.prototype.trimend@^1.0.6: define-properties "^1.1.4" es-abstract "^1.20.4" -string.prototype.trimstart@^1.0.5, string.prototype.trimstart@^1.0.6: +string.prototype.trimstart@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== diff --git a/android/build.gradle b/android/build.gradle index 285128db..ef344a0f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -5,7 +5,15 @@ def safeExtGet(prop, fallback) { rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback } +def isNewArchitectureEnabled() { + return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true" +} + apply plugin: 'com.android.library' +if (isNewArchitectureEnabled()) { + apply plugin: 'com.facebook.react' +} + android { compileSdkVersion safeExtGet('compileSdkVersion', 28) @@ -17,11 +25,17 @@ android { versionCode 1 versionName "1.0" consumerProguardFiles "proguard.pro" + buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() } sourceSets { main { // let gradle pack the shared library into apk jniLibs.srcDirs = ['./lib'] + if (isNewArchitectureEnabled()) { + java.srcDirs += ['src/newarch'] + } else { + java.srcDirs += ['src/oldarch'] + } } } @@ -45,3 +59,10 @@ repositories { dependencies { implementation 'com.facebook.react:react-native:+' } +if (isNewArchitectureEnabled()) { + react { + jsRootDir = file("../lib/") + libraryName = "update" + codegenJavaPackageName = "cn.reactnative.modules.update" + } +} diff --git a/android/jni/hpatch.c b/android/jni/hpatch.c index 5c3592d1..1e30660b 100644 --- a/android/jni/hpatch.c +++ b/android/jni/hpatch.c @@ -24,7 +24,7 @@ int hpatch_getInfo_by_mem(hpatch_singleCompressedDiffInfo* out_patinfo, mem_as_hStreamInput(&patStream,pat,pat+patsize); if (!getSingleCompressedDiffInfo(out_patinfo,&patStream,0)) return kHPatch_error_info;//data error; - return kHPatch_ok; //ok + return kHPatch_ok; //ok } static hpatch_TDecompress* getDecompressPlugin(const char* compressType){ @@ -68,7 +68,7 @@ static int hpatch_by_stream(const hpatch_TStreamInput* old,hpatch_BOOL isLoadOld _check(decompressPlugin,kHPatch_error_compressType); } } - {// mem + {// mem size_t mem_size; size_t oldSize=(size_t)old->streamSize; isLoadOldAllToMem=isLoadOldAllToMem&&(old->streamSize<=kMaxLoadMemOldSize); @@ -76,7 +76,7 @@ static int hpatch_by_stream(const hpatch_TStreamInput* old,hpatch_BOOL isLoadOld mem_size=temp_cache_size+(isLoadOldAllToMem?oldSize:0); temp_cache=malloc(mem_size); _check(temp_cache,kHPatch_error_malloc); - if (isLoadOldAllToMem){//load old to mem + if (isLoadOldAllToMem){//load old to mem uint8_t* oldMem=temp_cache+temp_cache_size; _check(old->read(old,0,oldMem,oldMem+oldSize),kHPatch_error_old_fread); mem_as_hStreamInput(&_old,oldMem,oldMem+oldSize); @@ -95,7 +95,7 @@ static int hpatch_by_stream(const hpatch_TStreamInput* old,hpatch_BOOL isLoadOld } int hpatch_by_mem(const uint8_t* old,size_t oldsize,uint8_t* newBuf,size_t newsize, - const uint8_t* pat,size_t patsize,const hpatch_singleCompressedDiffInfo* patInfo){ + const uint8_t* pat,size_t patsize,const hpatch_singleCompressedDiffInfo* patInfo){ hpatch_TStreamInput oldStream; hpatch_TStreamInput patStream; hpatch_TStreamOutput newStream; diff --git a/android/jni/hpatch.h b/android/jni/hpatch.h index 9215b647..02dc0708 100644 --- a/android/jni/hpatch.h +++ b/android/jni/hpatch.h @@ -1,5 +1,5 @@ -// hpatch.h -// import HDiffPatch, support patchData created by "hdiffz -SD -c-lzma2 oldfile newfile patchfile" +// hpatch.h +// import HDiffPatch, support patchData created by "hdiffz -SD -c-lzma2 oldfile newfile patchfile" // Copyright 2021 housisong, All rights reserved #ifndef HDIFFPATCH_PATCH_H @@ -41,4 +41,4 @@ int hpatch_by_file(const char* oldfile, const char* newfile, const char* patchfi #ifdef __cplusplus } #endif -#endif //HDIFFPATCH_PATCH_H \ No newline at end of file +#endif //HDIFFPATCH_PATCH_H diff --git a/android/src/main/java/cn/reactnative/modules/update/DownloadTaskParams.java b/android/src/main/java/cn/reactnative/modules/update/DownloadTaskParams.java index 2d9f80f3..0e51049b 100644 --- a/android/src/main/java/cn/reactnative/modules/update/DownloadTaskParams.java +++ b/android/src/main/java/cn/reactnative/modules/update/DownloadTaskParams.java @@ -1,7 +1,5 @@ package cn.reactnative.modules.update; -import android.content.Context; - import java.io.File; /** diff --git a/android/src/main/java/cn/reactnative/modules/update/UpdateModuleImpl.java b/android/src/main/java/cn/reactnative/modules/update/UpdateModuleImpl.java new file mode 100644 index 00000000..68bdd644 --- /dev/null +++ b/android/src/main/java/cn/reactnative/modules/update/UpdateModuleImpl.java @@ -0,0 +1,191 @@ +package cn.reactnative.modules.update; + +import android.app.Activity; +import android.app.Application; +import android.util.Log; +import com.facebook.react.ReactApplication; +import com.facebook.react.ReactInstanceManager; +import com.facebook.react.bridge.JSBundleLoader; +import com.facebook.react.bridge.Promise; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.bridge.ReadableMap; +import com.facebook.react.bridge.UiThreadUtil; +import java.io.File; +import java.lang.reflect.Field; +public class UpdateModuleImpl { + + public static final String NAME = "Pushy"; + + public static void downloadFullUpdate(UpdateContext updateContext, ReadableMap options, Promise promise) { + String url = options.getString("updateUrl"); + String hash = options.getString("hash"); + updateContext.downloadFullUpdate(url, hash, new UpdateContext.DownloadFileListener() { + @Override + public void onDownloadCompleted(DownloadTaskParams params) { + promise.resolve(null); + } + + @Override + public void onDownloadFailed(Throwable error) { + promise.reject(error); + } + }); + } + + public static void downloadAndInstallApk(UpdateContext updateContext, ReadableMap options, Promise promise) { + String url = options.getString("url"); + String hash = options.getString("hash"); + String target = options.getString("target"); + updateContext.downloadFile(url, hash, target, new UpdateContext.DownloadFileListener() { + @Override + public void onDownloadCompleted(DownloadTaskParams params) { + UpdateModule.installApk(params.targetFile); + promise.resolve(null); + } + + @Override + public void onDownloadFailed(Throwable error) { + promise.reject(error); + } + }); + } + + public static void installApk(String url) { + File toInstall = new File(url); + UpdateModule.installApk(toInstall); + } + + public static void downloadPatchFromPackage(UpdateContext updateContext, ReadableMap options, Promise promise) { + String url = options.getString("updateUrl"); + String hash = options.getString("hash"); + updateContext.downloadPatchFromApk(url, hash, new UpdateContext.DownloadFileListener() { + @Override + public void onDownloadCompleted(DownloadTaskParams params) { + promise.resolve(null); + } + + @Override + public void onDownloadFailed(Throwable error) { + promise.reject(error); + } + }); + } + + public static void downloadPatchFromPpk(UpdateContext updateContext, ReadableMap options, Promise promise) { + String url = options.getString("updateUrl"); + String hash = options.getString("hash"); + + String originHash = options.getString("originHash"); + + updateContext.downloadPatchFromPpk(url, hash, originHash, new UpdateContext.DownloadFileListener() { + @Override + public void onDownloadCompleted(DownloadTaskParams params) { + promise.resolve(null); + } + + @Override + public void onDownloadFailed(Throwable error) { + promise.reject(error); + } + }); + } + + public static void reloadUpdate(UpdateContext updateContext, ReactApplicationContext mContext, ReadableMap options) { + final String hash = options.getString("hash"); + + UiThreadUtil.runOnUiThread(new Runnable() { + @Override + public void run() { + try { + updateContext.switchVersion(hash); + Activity activity = mContext.getCurrentActivity(); + Application application = activity.getApplication(); + ReactInstanceManager instanceManager = updateContext.getCustomReactInstanceManager(); + + if (instanceManager == null) { + instanceManager = ((ReactApplication) application).getReactNativeHost().getReactInstanceManager(); + } + + try { + JSBundleLoader loader = JSBundleLoader.createFileLoader(UpdateContext.getBundleUrl(application)); + Field loadField = instanceManager.getClass().getDeclaredField("mBundleLoader"); + loadField.setAccessible(true); + loadField.set(instanceManager, loader); + } catch (Throwable err) { + Field jsBundleField = instanceManager.getClass().getDeclaredField("mJSBundleFile"); + jsBundleField.setAccessible(true); + jsBundleField.set(instanceManager, UpdateContext.getBundleUrl(application)); + } + + try { + instanceManager.recreateReactContextInBackground(); + } catch (Throwable err) { + activity.recreate(); + } + + } catch (Throwable err) { + Log.e("pushy", "switchVersion failed", err); + } + } + }); + } + + + public static void setNeedUpdate(UpdateContext updateContext, ReadableMap options) { + final String hash = options.getString("hash"); + + UiThreadUtil.runOnUiThread(new Runnable() { + @Override + public void run() { + try { + updateContext.switchVersion(hash); + } catch (Throwable err) { + Log.e("pushy", "switchVersionLater failed", err); + } + } + }); + } + + public static void markSuccess(UpdateContext updateContext) { + UiThreadUtil.runOnUiThread(new Runnable() { + @Override + public void run() { + updateContext.markSuccess(); + } + }); + } + + public static void setBlockUpdate(UpdateContext updateContext, ReadableMap options) { + final int until = options.getInt("until"); + final String reason = options.getString("reason"); + UiThreadUtil.runOnUiThread(new Runnable() { + @Override + public void run() { + updateContext.setBlockUpdate(until, reason); + } + }); + } + + public static void setUuid(UpdateContext updateContext, String uuid) { + UiThreadUtil.runOnUiThread(new Runnable() { + @Override + public void run() { + updateContext.setKv("uuid", uuid); + } + }); + } + + public static void setLocalHashInfo(UpdateContext updateContext, final String hash, final String info) { + UiThreadUtil.runOnUiThread(new Runnable() { + @Override + public void run() { + updateContext.setKv("hash_" + hash, info); + } + }); + } + + public static void getLocalHashInfo(UpdateContext updateContext, final String hash, Promise promise) { + promise.resolve(updateContext.getKv("hash_" + hash)); + } + +} diff --git a/android/src/main/java/cn/reactnative/modules/update/UpdatePackage.java b/android/src/main/java/cn/reactnative/modules/update/UpdatePackage.java index 0bd0c69d..f3937af0 100644 --- a/android/src/main/java/cn/reactnative/modules/update/UpdatePackage.java +++ b/android/src/main/java/cn/reactnative/modules/update/UpdatePackage.java @@ -1,34 +1,45 @@ package cn.reactnative.modules.update; -import com.facebook.react.ReactPackage; -import com.facebook.react.bridge.JavaScriptModule; +import androidx.annotation.Nullable; +import com.facebook.react.TurboReactPackage; import com.facebook.react.bridge.NativeModule; import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.uimanager.ViewManager; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; +import com.facebook.react.module.model.ReactModuleInfo; +import com.facebook.react.module.model.ReactModuleInfoProvider; +import java.util.HashMap; +import java.util.Map; /** * Created by tdzl2003 on 3/31/16. */ -public class UpdatePackage implements ReactPackage { - +public class UpdatePackage extends TurboReactPackage { + @Nullable @Override - public List createNativeModules(ReactApplicationContext reactContext) { - return Arrays.asList(new NativeModule[]{ - // Modules from third-party - new UpdateModule(reactContext), - }); - } - - public List> createJSModules() { - return Collections.emptyList(); + public NativeModule getModule(String name, ReactApplicationContext reactContext) { + if (name.equals(UpdateModuleImpl.NAME)) { + return new UpdateModule(reactContext); + } else { + return null; + } } @Override - public List createViewManagers(ReactApplicationContext reactContext) { - return Collections.emptyList(); + public ReactModuleInfoProvider getReactModuleInfoProvider() { + return () -> { + final Map moduleInfos = new HashMap<>(); + boolean isTurboModule = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; + moduleInfos.put( + UpdateModuleImpl.NAME, + new ReactModuleInfo( + UpdateModuleImpl.NAME, + UpdateModuleImpl.NAME, + false, // canOverrideExistingModule + false, // needsEagerInit + true, // hasConstants + false, // isCxxModule + isTurboModule // isTurboModule + )); + return moduleInfos; + }; } } diff --git a/android/src/newarch/cn/reactnative/modules/update/UpdateModule.java b/android/src/newarch/cn/reactnative/modules/update/UpdateModule.java new file mode 100644 index 00000000..05a57f4a --- /dev/null +++ b/android/src/newarch/cn/reactnative/modules/update/UpdateModule.java @@ -0,0 +1,136 @@ +package cn.reactnative.modules.update; + +import static androidx.core.content.FileProvider.getUriForFile; +import android.content.Intent; +import android.net.Uri; +import android.os.Build; +import com.facebook.react.bridge.Promise; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.bridge.ReactContext; +import com.facebook.react.bridge.ReadableMap; +import com.facebook.react.bridge.WritableMap; +import com.facebook.react.modules.core.DeviceEventManagerModule; +import java.io.File; +import java.util.HashMap; +import java.util.Map; + +public class UpdateModule extends NativeUpdateSpec { + UpdateContext updateContext; + public static ReactApplicationContext mContext; + public UpdateModule(ReactApplicationContext reactContext, UpdateContext updateContext) { + super(reactContext); + this.updateContext = updateContext; + mContext = reactContext; + } + + public UpdateModule(ReactApplicationContext reactContext) { + this(reactContext, new UpdateContext(reactContext.getApplicationContext())); + } + + @Override + protected Map getTypedExportedConstants() { + final Map constants = new HashMap<>(); + constants.put("downloadRootDir", updateContext.getRootDir()); + constants.put("packageVersion", updateContext.getPackageVersion()); + constants.put("currentVersion", updateContext.getCurrentVersion()); + constants.put("buildTime", updateContext.getBuildTime()); + constants.put("isUsingBundleUrl", updateContext.getIsUsingBundleUrl()); + boolean isFirstTime = updateContext.isFirstTime(); + constants.put("isFirstTime", isFirstTime); + if (isFirstTime) { + updateContext.clearFirstTime(); + } + String rolledBackVersion = updateContext.rolledBackVersion(); + constants.put("rolledBackVersion", rolledBackVersion); + if (rolledBackVersion != null) { + updateContext.clearRollbackMark(); + } + constants.put("blockUpdate", updateContext.getBlockUpdate()); + constants.put("uuid", updateContext.getKv("uuid")); + return constants; + } + + @Override + public String getName() { + return UpdateModuleImpl.NAME; + } + + @Override + public void downloadFullUpdate(ReadableMap options, final Promise promise) { + UpdateModuleImpl.downloadFullUpdate(this.updateContext,options,promise); + } + + @Override + public void downloadAndInstallApk(ReadableMap options, final Promise promise) { + UpdateModuleImpl.downloadAndInstallApk(this.updateContext,options,promise); + } + + public static void installApk(File toInstall) { + Uri apkUri; + Intent intent; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { + apkUri = getUriForFile(mContext, mContext.getPackageName() + ".pushy.fileprovider", toInstall); + intent = new Intent(Intent.ACTION_INSTALL_PACKAGE); + intent.setData(apkUri); + intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + } else { + apkUri = Uri.fromFile(toInstall); + intent = new Intent(Intent.ACTION_VIEW); + intent.setDataAndType(apkUri, "application/vnd.android.package-archive"); + intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + } + mContext.startActivity(intent); + } + + @Override + public void downloadPatchFromPackage(ReadableMap options, final Promise promise) { + UpdateModuleImpl.downloadPatchFromPackage(updateContext,options,promise); + } + + @Override + public void downloadPatchFromPpk(ReadableMap options, final Promise promise) { + UpdateModuleImpl.downloadPatchFromPpk(updateContext,options,promise); + } + + @Override + public void reloadUpdate(ReadableMap options) { + UpdateModuleImpl.reloadUpdate(updateContext, mContext, options); + } + + @Override + public void setNeedUpdate(ReadableMap options) { + UpdateModuleImpl.setNeedUpdate(updateContext, options); + } + + @Override + public void markSuccess() { + UpdateModuleImpl.markSuccess(updateContext); + } + + @Override + public void setBlockUpdate(ReadableMap options) { + UpdateModuleImpl.setBlockUpdate(updateContext,options); + } + + @Override + public void setUuid(final String uuid) { + UpdateModuleImpl.setUuid(updateContext,uuid); + } + + @Override + public void setLocalHashInfo(final String hash, final String info) { + UpdateModuleImpl.setLocalHashInfo(updateContext,hash,info); + } + + @Override + public void getLocalHashInfo(final String hash, final Promise promise) { + UpdateModuleImpl.getLocalHashInfo(updateContext,hash,promise); + } + + /* 发送事件*/ + public static void sendEvent(String eventName, WritableMap params) { + ((ReactContext) mContext).getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(eventName, + params); + } +} diff --git a/android/src/main/java/cn/reactnative/modules/update/UpdateModule.java b/android/src/oldarch/cn/reactnative/modules/update/UpdateModule.java similarity index 99% rename from android/src/main/java/cn/reactnative/modules/update/UpdateModule.java rename to android/src/oldarch/cn/reactnative/modules/update/UpdateModule.java index f863fcc7..2638c5ec 100644 --- a/android/src/main/java/cn/reactnative/modules/update/UpdateModule.java +++ b/android/src/oldarch/cn/reactnative/modules/update/UpdateModule.java @@ -66,7 +66,7 @@ public Map getConstants() { @Override public String getName() { - return "RCTPushy"; + return UpdateModuleImpl.NAME; } @ReactMethod diff --git a/ios/RCTPushy/RCTPushy.m b/ios/RCTPushy/RCTPushy.m index a20693d1..b5bff847 100644 --- a/ios/RCTPushy/RCTPushy.m +++ b/ios/RCTPushy/RCTPushy.m @@ -1,7 +1,10 @@ #import "RCTPushy.h" #import "RCTPushyDownloader.h" #import "RCTPushyManager.h" - +// Thanks to this guard, we won't import this header when we build for the old architecture. +#ifdef RCT_NEW_ARCH_ENABLED +#import "RNUpdateSpec.h" +#endif #import #import @@ -562,4 +565,13 @@ + (NSString *)buildTime #endif } +// Thanks to this guard, we won't compile this code when we build for the old architecture. +#ifdef RCT_NEW_ARCH_ENABLED +- (std::shared_ptr)getTurboModule: + (const facebook::react::ObjCTurboModule::InitParams &)params +{ + return std::make_shared(params); +} +#endif + @end diff --git a/ios/pushy_build_time.txt b/ios/pushy_build_time.txt index 2cf04c25..75ee2727 100644 --- a/ios/pushy_build_time.txt +++ b/ios/pushy_build_time.txt @@ -1 +1 @@ -1674743151 +1676798137 diff --git a/lib/NativeUpdate.js b/lib/NativeUpdate.js new file mode 100644 index 00000000..be0d8c65 --- /dev/null +++ b/lib/NativeUpdate.js @@ -0,0 +1,41 @@ +/** + * @format + * @flow strict-local + */ +'use strict'; + +import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; +import {TurboModuleRegistry} from 'react-native'; + +export interface Spec extends TurboModule { + getConstants: () => { + downloadRootDir: string; + packageVersion: string; + currentVersion: string; + isFirstTime: boolean; + rolledBackVersion: string; + buildTime: string; + blockUpdate: Object; + uuid: string; + isUsingBundleUrl: boolean; + }; + setLocalHashInfo(hash: string, info:string): void; + getLocalHashInfo(hash: string):Promise; + setUuid(uuid: string): void; + setBlockUpdate(options: {reason: string,until: number}): void; + downloadPatchFromPpk(options: { updateUrl:string, + hash: string, + originHash: string}):Promise; + downloadPatchFromPackage(options: { updateUrl:string, + hash: string}): Promise; + downloadFullUpdate(options: { updateUrl:string, + hash: string}): Promise; + reloadUpdate(options: { hash: string}): void; + setNeedUpdate(options: { hash: string}): void; + markSuccess(): void; + downloadAndInstallApk(options: { url: string, + target : string, + hash: string}): Promise; +} + +export default (TurboModuleRegistry.get('Pushy'): ?Spec); \ No newline at end of file diff --git a/lib/main.js b/lib/main.js index 61edd479..96c2aa72 100644 --- a/lib/main.js +++ b/lib/main.js @@ -15,25 +15,28 @@ const { version: v, } = require('react-native/Libraries/Core/ReactNativeVersion'); const RNVersion = `${v.major}.${v.minor}.${v.patch}`; - -let Pushy = NativeModules.Pushy; +const isTurboModuleEnabled = global.__turboModuleProxy != null; +const Pushy = isTurboModuleEnabled ? + require("./NativeUpdate").default : + NativeModules.Pushy; if (!Pushy) { throw new Error('react-native-update模块无法加载,请对照安装文档检查配置。'); } +const PushyConstants = isTurboModuleEnabled ? Pushy.getConstants(): Pushy; -export const downloadRootDir = Pushy.downloadRootDir; -export const packageVersion = Pushy.packageVersion; -export const currentVersion = Pushy.currentVersion; -export const isFirstTime = Pushy.isFirstTime; -const rolledBackVersion = Pushy.rolledBackVersion; +export const downloadRootDir = PushyConstants.downloadRootDir; +export const packageVersion = PushyConstants.packageVersion; +export const currentVersion = PushyConstants.currentVersion; +export const isFirstTime = PushyConstants.isFirstTime; +const rolledBackVersion = PushyConstants.rolledBackVersion; export const isRolledBack = typeof rolledBackVersion === 'string'; -export const buildTime = Pushy.buildTime; -let blockUpdate = Pushy.blockUpdate; -let uuid = Pushy.uuid; +export const buildTime = PushyConstants.buildTime; +let blockUpdate = PushyConstants.blockUpdate; +let uuid = PushyConstants.uuid; -if (Platform.OS === 'android' && !Pushy.isUsingBundleUrl) { +if (Platform.OS === 'android' && !PushyConstants.isUsingBundleUrl) { throw new Error( 'react-native-update模块无法加载,请对照文档检查Bundle URL的配置', ); diff --git a/package.json b/package.json index 9145ae0f..4c16cf8b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-update", - "version": "8.1.0", + "version": "9.0.0", "description": "react-native hot update", "main": "lib/index.js", "scripts": { @@ -30,5 +30,14 @@ "homepage": "https://github.com/reactnativecn/react-native-pushy#readme", "dependencies": { "nanoid": "^3.3.3" - } + }, + "codegenConfig": { + "libraries": [ + { + "name": "RNUpdateSpec", + "type": "modules", + "jsSrcsDir": "lib" + } + ] +} } diff --git a/react-native-update.podspec b/react-native-update.podspec index be09ca57..6b4d42e4 100644 --- a/react-native-update.podspec +++ b/react-native-update.podspec @@ -1,7 +1,8 @@ require 'json' package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) - +folly_version = '2021.07.22.00' +folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32' Pod::Spec.new do |s| s.name = package['name'] s.version = package['version'] @@ -13,7 +14,9 @@ Pod::Spec.new do |s| s.cocoapods_version = '>= 1.6.0' s.platform = :ios, "8.0" + s.platforms = { :ios => "11.0" } s.source = { :git => 'https://github.com/reactnativecn/react-native-pushy.git', :tag => '#{s.version}' } + s.source_files = "ios/**/*.{h,m,mm,swift}" s.libraries = 'bz2', 'z' s.vendored_libraries = 'RCTPushy/libRCTPushy.a' s.pod_target_xcconfig = { 'USER_HEADER_SEARCH_PATHS' => '"$(SRCROOT)/../node_modules/react-native-update/ios"' } @@ -21,10 +24,11 @@ Pod::Spec.new do |s| s.script_phase = { :name => 'Generate build time', :script => 'set -x;date +%s > ${PODS_ROOT}/../../node_modules/react-native-update/ios/pushy_build_time.txt', :execution_position => :before_compile } s.dependency 'React' + s.dependency "React-Core" s.dependency 'SSZipArchive' s.subspec 'RCTPushy' do |ss| - ss.source_files = 'ios/RCTPushy/*.{h,m}' + ss.source_files = 'ios/RCTPushy/*.{h,m,mm,swift}' ss.public_header_files = ['ios/RCTPushy/RCTPushy.h'] end @@ -37,4 +41,18 @@ Pod::Spec.new do |s| 'android/jni/lzma/C/Lzma2Dec.{h,c}'] ss.private_header_files = 'ios/RCTPushy/HDiffPatch/**/*.h' end + # This guard prevent to install the dependencies when we run `pod install` in the old architecture. +if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then + s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1" + s.pod_target_xcconfig = { + "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"", + "CLANG_CXX_LANGUAGE_STANDARD" => "c++17" + } + + s.dependency "React-Codegen" + s.dependency "RCT-Folly", folly_version + s.dependency "RCTRequired" + s.dependency "RCTTypeSafety" + s.dependency "ReactCommon/turbomodule/core" +end end