mirror of
				https://gitcode.com/gh_mirrors/re/react-native-pushy.git
				synced 2025-10-31 21:33:12 +08:00 
			
		
		
		
	feat: support for new architecture
This commit is contained in:
		| @@ -1 +1 @@ | ||||
| 2.7.6 | ||||
| 3.1.1 | ||||
|   | ||||
							
								
								
									
										3
									
								
								Example/testHotUpdate/.update
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								Example/testHotUpdate/.update
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| { | ||||
|     "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoidXNlciIsInVpZCI6OTQ3NywiZXhwIjoxNjc5MjczODYwOTgzLCJpYXQiOjE2NzY2ODE4NjB9.RtoiYnN_2hJ6-aRsx6JkRWil0-RxkdpL7yD7koAky8E" | ||||
| } | ||||
| @@ -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 | ||||
|   | ||||
| @@ -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", | ||||
|     ], | ||||
| ) | ||||
| @@ -167,4 +167,4 @@ dependencies { | ||||
|     } | ||||
| } | ||||
|  | ||||
| apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) | ||||
| apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) | ||||
|   | ||||
							
								
								
									
										
											BIN
										
									
								
								Example/testHotUpdate/android/app/release/app-release.apk
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Example/testHotUpdate/android/app/release/app-release.apk
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| @@ -0,0 +1,20 @@ | ||||
| { | ||||
|   "version": 3, | ||||
|   "artifactType": { | ||||
|     "type": "APK", | ||||
|     "kind": "Directory" | ||||
|   }, | ||||
|   "applicationId": "com.testhotupdate", | ||||
|   "variantName": "release", | ||||
|   "elements": [ | ||||
|     { | ||||
|       "type": "SINGLE", | ||||
|       "filters": [], | ||||
|       "attributes": [], | ||||
|       "versionCode": 1, | ||||
|       "versionName": "1.0", | ||||
|       "outputFile": "app-release.apk" | ||||
|     } | ||||
|   ], | ||||
|   "elementType": "File" | ||||
| } | ||||
| @@ -72,4 +72,4 @@ public class ReactNativeFlipper { | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| } | ||||
|   | ||||
| @@ -9,16 +9,17 @@ import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint; | ||||
| 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 class MainApplication extends Application implements ReactApplication { | ||||
|     } | ||||
|     ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); | ||||
|   } | ||||
| } | ||||
| } | ||||
|   | ||||
| @@ -18,4 +18,4 @@ buildscript { | ||||
|         classpath("com.android.tools.build:gradle:7.3.1") | ||||
|         classpath("com.facebook.react:react-native-gradle-plugin") | ||||
|     } | ||||
| } | ||||
| } | ||||
|   | ||||
										
											Binary file not shown.
										
									
								
							| @@ -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) | ||||
| export NODE_BINARY=$(command -v node) | ||||
|   | ||||
| @@ -57,4 +57,4 @@ target 'testHotupdate' do | ||||
|     ) | ||||
|     __apply_Xcode_12_5_M1_post_install_workaround(installer) | ||||
|   end | ||||
| end | ||||
| end | ||||
|   | ||||
| @@ -297,16 +297,19 @@ PODS: | ||||
|   - React-jsinspector (0.71.1) | ||||
|   - React-logger (0.71.1): | ||||
|     - glog | ||||
|   - react-native-update (8.1.0): | ||||
|   - react-native-update (9.1.0): | ||||
|     - React | ||||
|     - react-native-update/HDiffPatch (= 8.1.0) | ||||
|     - react-native-update/RCTPushy (= 8.1.0) | ||||
|     - React-Core | ||||
|     - react-native-update/HDiffPatch (= 9.1.0) | ||||
|     - react-native-update/RCTPushy (= 9.1.0) | ||||
|     - SSZipArchive | ||||
|   - react-native-update/HDiffPatch (8.1.0): | ||||
|   - react-native-update/HDiffPatch (9.1.0): | ||||
|     - React | ||||
|     - React-Core | ||||
|     - SSZipArchive | ||||
|   - react-native-update/RCTPushy (8.1.0): | ||||
|   - react-native-update/RCTPushy (9.1.0): | ||||
|     - React | ||||
|     - React-Core | ||||
|     - SSZipArchive | ||||
|   - React-perflogger (0.71.1) | ||||
|   - React-RCTActionSheet (0.71.1): | ||||
| @@ -549,9 +552,9 @@ 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 | ||||
|   Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0 | ||||
| @@ -564,7 +567,7 @@ SPEC CHECKSUMS: | ||||
|   Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541 | ||||
|   FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86 | ||||
|   fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 | ||||
|   glog: 476ee3e89abb49e07f822b48323c51c57124b572 | ||||
|   glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b | ||||
|   hermes-engine: 922ccd744f50d9bfde09e9677bf0f3b562ea5fb9 | ||||
|   libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 | ||||
|   OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c | ||||
| @@ -582,7 +585,7 @@ SPEC CHECKSUMS: | ||||
|   React-jsiexecutor: 60cf272aababc5212410e4249d17cea14fc36caa | ||||
|   React-jsinspector: ff56004b0c974b688a6548c156d5830ad751ae07 | ||||
|   React-logger: 60a0b5f8bed667ecf9e24fecca1f30d125de6d75 | ||||
|   react-native-update: 394b7f52ed3c0688d12084f3fb47d49504131be6 | ||||
|   react-native-update: a35fa7088d6bd4bc17c83b4c0747b7834f5b4194 | ||||
|   React-perflogger: ec8eef2a8f03ecfa6361c2c5fb9197ef4a29cc85 | ||||
|   React-RCTActionSheet: a0c023b86cf4c862fa9c4eb0f6f91fbe878fb2de | ||||
|   React-RCTAnimation: 168d53718c74153947c0109f55900faa64d79439 | ||||
| @@ -601,6 +604,6 @@ SPEC CHECKSUMS: | ||||
|   Yoga: 921eb014669cf9c718ada68b08d362517d564e0c | ||||
|   YogaKit: f782866e155069a2cca2517aafea43200b01fd5a | ||||
|  | ||||
| PODFILE CHECKSUM: 640d0fbc8653c12b1d7121eae0169fad3d42517e | ||||
| PODFILE CHECKSUM: 3a4760d7ec3a6ffc7497e8723f29129170c8dc0d | ||||
|  | ||||
| COCOAPODS: 1.11.3 | ||||
|   | ||||
| @@ -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 = "<group>"; }; | ||||
| 		13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = testHotupdate/Info.plist; sourceTree = "<group>"; }; | ||||
| 		13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = testHotupdate/main.m; sourceTree = "<group>"; }; | ||||
| 		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 = "<group>"; }; | ||||
| 		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 = "<group>"; }; | ||||
| 		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 = "<group>"; }; | ||||
| 		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 = "<group>"; }; | ||||
| 		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 = "<group>"; }; | ||||
| 		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 = "<group>"; }; | ||||
| 		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 = "<group>"; }; | ||||
| 		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 = "<group>"; | ||||
| @@ -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 = "<group>"; | ||||
| @@ -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"; | ||||
| 			inputPaths = ( | ||||
| 				"${PODS_PODFILE_DIR_PATH}/Podfile.lock", | ||||
| 				"${PODS_ROOT}/Manifest.lock", | ||||
| 			); | ||||
| 			name = "[CP] Check Pods Manifest.lock"; | ||||
| 			outputFileListPaths = ( | ||||
| 				"${PODS_ROOT}/Target Support Files/Pods-testHotupdate-testHotupdateTests/Pods-testHotupdate-testHotupdateTests-frameworks-${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-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", | ||||
| 			); | ||||
| 			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"; | ||||
| 			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)", | ||||
|   | ||||
| @@ -0,0 +1,8 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||||
| <plist version="1.0"> | ||||
| <dict> | ||||
| 	<key>IDEDidComputeMac32BitWarning</key> | ||||
| 	<true/> | ||||
| </dict> | ||||
| </plist> | ||||
| @@ -3,4 +3,4 @@ | ||||
|  | ||||
| @interface AppDelegate : RCTAppDelegate | ||||
|  | ||||
| @end | ||||
| @end | ||||
|   | ||||
| @@ -35,4 +35,4 @@ | ||||
|   return true; | ||||
| } | ||||
|  | ||||
| @end | ||||
| @end | ||||
|   | ||||
| @@ -17,11 +17,11 @@ | ||||
| 	<key>CFBundlePackageType</key> | ||||
| 	<string>APPL</string> | ||||
| 	<key>CFBundleShortVersionString</key> | ||||
| 	<string>1.0</string> | ||||
| 	<string>$(MARKETING_VERSION)</string> | ||||
| 	<key>CFBundleSignature</key> | ||||
| 	<string>????</string> | ||||
| 	<key>CFBundleVersion</key> | ||||
| 	<string>1</string> | ||||
| 	<string>$(CURRENT_PROJECT_VERSION)</string> | ||||
| 	<key>LSRequiresIPhoneOS</key> | ||||
| 	<true/> | ||||
| 	<key>NSAppTransportSecurity</key> | ||||
|   | ||||
| @@ -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== | ||||
|   | ||||
| @@ -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" | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -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 @@ _clear: | ||||
| } | ||||
|  | ||||
| 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; | ||||
|   | ||||
| @@ -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 | ||||
| #endif //HDIFFPATCH_PATCH_H | ||||
|   | ||||
| @@ -1,7 +1,5 @@ | ||||
| package cn.reactnative.modules.update; | ||||
|  | ||||
| import android.content.Context; | ||||
|  | ||||
| import java.io.File; | ||||
|  | ||||
| /** | ||||
|   | ||||
| @@ -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)); | ||||
|     } | ||||
|  | ||||
| } | ||||
| @@ -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<NativeModule> createNativeModules(ReactApplicationContext reactContext) { | ||||
|         return Arrays.asList(new NativeModule[]{ | ||||
|                 // Modules from third-party | ||||
|                 new UpdateModule(reactContext), | ||||
|         }); | ||||
|     } | ||||
|  | ||||
|     public List<Class<? extends JavaScriptModule>> 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<ViewManager> createViewManagers(ReactApplicationContext reactContext) { | ||||
|         return Collections.emptyList(); | ||||
|     public ReactModuleInfoProvider getReactModuleInfoProvider() { | ||||
|         return () -> { | ||||
|             final Map<String, ReactModuleInfo> 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; | ||||
|         }; | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -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<String, Object> getTypedExportedConstants() { | ||||
|         final Map<String, Object> 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); | ||||
|     } | ||||
| } | ||||
| @@ -66,7 +66,7 @@ public class UpdateModule extends ReactContextBaseJavaModule { | ||||
| 
 | ||||
|     @Override | ||||
|     public String getName() { | ||||
|         return "RCTPushy"; | ||||
|         return UpdateModuleImpl.NAME; | ||||
|     } | ||||
| 
 | ||||
|     @ReactMethod | ||||
| @@ -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 <React/RCTConvert.h> | ||||
| #import <React/RCTLog.h> | ||||
| @@ -562,4 +565,13 @@ RCT_EXPORT_METHOD(markSuccess) | ||||
| #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<facebook::react::TurboModule>)getTurboModule: | ||||
|     (const facebook::react::ObjCTurboModule::InitParams &)params | ||||
| { | ||||
|     return std::make_shared<facebook::react::NativeCalculatorSpecJSI>(params); | ||||
| } | ||||
| #endif | ||||
|  | ||||
| @end | ||||
|   | ||||
| @@ -1 +1 @@ | ||||
| 1674743151 | ||||
| 1676798137 | ||||
|   | ||||
							
								
								
									
										41
									
								
								lib/NativeUpdate.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								lib/NativeUpdate.js
									
									
									
									
									
										Normal file
									
								
							| @@ -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<string>; | ||||
|   setUuid(uuid: string): void; | ||||
|   setBlockUpdate(options: {reason: string,until: number}): void; | ||||
|   downloadPatchFromPpk(options: { updateUrl:string, | ||||
|     hash: string, | ||||
|     originHash: string}):Promise<void>; | ||||
|   downloadPatchFromPackage(options: { updateUrl:string, | ||||
|         hash: string}): Promise<void>; | ||||
|   downloadFullUpdate(options: { updateUrl:string, | ||||
|         hash: string}): Promise<void>; | ||||
|   reloadUpdate(options: { hash: string}): void; | ||||
|   setNeedUpdate(options: { hash: string}): void; | ||||
|   markSuccess(): void; | ||||
|   downloadAndInstallApk(options: { url: string, | ||||
|     target : string, | ||||
|     hash: string}): Promise<void>; | ||||
| } | ||||
|  | ||||
| export default (TurboModuleRegistry.get<Spec>('Pushy'): ?Spec); | ||||
							
								
								
									
										24
									
								
								lib/main.js
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								lib/main.js
									
									
									
									
									
								
							| @@ -15,25 +15,27 @@ 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模块无法加载,请对照安装文档检查配置。'); | ||||
| } | ||||
|  | ||||
| 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 = isTurboModuleEnabled ? Pushy.getConstants().downloadRootDir : Pushy.downloadRootDir; | ||||
| export const packageVersion = isTurboModuleEnabled ? Pushy.getConstants().packageVersion : Pushy.packageVersion; | ||||
| export const currentVersion = isTurboModuleEnabled ? Pushy.getConstants().currentVersion : Pushy.currentVersion; | ||||
| export const isFirstTime = isTurboModuleEnabled ? Pushy.getConstants().isFirstTime : Pushy.isFirstTime; | ||||
| const rolledBackVersion = isTurboModuleEnabled ? Pushy.getConstants().rolledBackVersion : Pushy.rolledBackVersion; | ||||
| export const isRolledBack = typeof rolledBackVersion === 'string'; | ||||
|  | ||||
| export const buildTime = Pushy.buildTime; | ||||
| let blockUpdate = Pushy.blockUpdate; | ||||
| let uuid = Pushy.uuid; | ||||
| export const buildTime = isTurboModuleEnabled ? Pushy.getConstants().buildTime : Pushy.buildTime; | ||||
| let blockUpdate = isTurboModuleEnabled ? Pushy.getConstants().blockUpdate : Pushy.blockUpdate; | ||||
| let uuid = isTurboModuleEnabled ? Pushy.getConstants().uuid : Pushy.uuid; | ||||
|  | ||||
| if (Platform.OS === 'android' && !Pushy.isUsingBundleUrl) { | ||||
| if (Platform.OS === 'android' && !(isTurboModuleEnabled ? Pushy.getConstants().isUsingBundleUrl : Pushy.isUsingBundleUrl)) { | ||||
|   throw new Error( | ||||
|     'react-native-update模块无法加载,请对照文档检查Bundle URL的配置', | ||||
|   ); | ||||
|   | ||||
							
								
								
									
										13
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								package.json
									
									
									
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "react-native-update", | ||||
|   "version": "8.1.0", | ||||
|   "version": "9.1.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" | ||||
|         } | ||||
|     ] | ||||
| } | ||||
| } | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 steven
					steven