1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-17 20:56:10 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Compare commits

..

12 Commits

Author SHA1 Message Date
sunnylqm
eea7ff26f2 v5.10.0 2020-12-18 11:17:07 +08:00
sunnylqm
684dc8267d Back compatibility 2020-12-18 11:16:49 +08:00
sunnylqm
5786bf8132 v5.10.0-beta0 2020-12-17 00:15:48 +08:00
sunnylqm
1bd5fbbc94 Refactor ios rollback 2020-12-17 00:12:30 +08:00
sunnylqm
cd2eb9417a Update gitignore 2020-11-03 16:17:24 +08:00
sunnylqm
7d8730f590 v5.9.3 2020-11-03 16:17:03 +08:00
sunnylqm
e3081a02db Rename file_paths.xml to avoid overwrite 2020-11-03 15:52:59 +08:00
sunnylqm
ec8c475c54 Add webview test 2020-10-21 15:51:51 +08:00
sunnylqm
ac18785e50 Add webview 2020-10-21 08:26:55 +08:00
sunnylqm
e80317415c Upgrade 0.63.3 2020-10-21 08:12:52 +08:00
sunnylqm
f5c307deca v5.9.1 2020-10-06 23:41:08 +08:00
sunnylqm
b4feae292d Fix index.d.ts 2020-10-06 23:40:51 +08:00
15 changed files with 408 additions and 263 deletions

1
.gitignore vendored
View File

@@ -42,3 +42,4 @@ node_modules/
npm-debug.log
Example/**/update.json
yarn-error.log

View File

@@ -156,6 +156,7 @@ android {
signingConfig signingConfigs.debug
}
release {
crunchPngs false
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.debug

View File

@@ -3,14 +3,14 @@ PODS:
- CocoaAsyncSocket (7.6.4)
- CocoaLibEvent (1.0.0)
- DoubleConversion (1.1.6)
- FBLazyVector (0.63.2)
- FBReactNativeSpec (0.63.2):
- FBLazyVector (0.63.3)
- FBReactNativeSpec (0.63.3):
- Folly (= 2020.01.13.00)
- RCTRequired (= 0.63.2)
- RCTTypeSafety (= 0.63.2)
- React-Core (= 0.63.2)
- React-jsi (= 0.63.2)
- ReactCommon/turbomodule/core (= 0.63.2)
- RCTRequired (= 0.63.3)
- RCTTypeSafety (= 0.63.3)
- React-Core (= 0.63.3)
- React-jsi (= 0.63.3)
- ReactCommon/turbomodule/core (= 0.63.3)
- Flipper (0.54.0):
- Flipper-Folly (~> 2.2)
- Flipper-RSocket (~> 1.1)
@@ -70,243 +70,245 @@ PODS:
- OpenSSL-Universal (1.0.2.19):
- OpenSSL-Universal/Static (= 1.0.2.19)
- OpenSSL-Universal/Static (1.0.2.19)
- RCTRequired (0.63.2)
- RCTTypeSafety (0.63.2):
- FBLazyVector (= 0.63.2)
- RCTRequired (0.63.3)
- RCTTypeSafety (0.63.3):
- FBLazyVector (= 0.63.3)
- Folly (= 2020.01.13.00)
- RCTRequired (= 0.63.2)
- React-Core (= 0.63.2)
- React (0.63.2):
- React-Core (= 0.63.2)
- React-Core/DevSupport (= 0.63.2)
- React-Core/RCTWebSocket (= 0.63.2)
- React-RCTActionSheet (= 0.63.2)
- React-RCTAnimation (= 0.63.2)
- React-RCTBlob (= 0.63.2)
- React-RCTImage (= 0.63.2)
- React-RCTLinking (= 0.63.2)
- React-RCTNetwork (= 0.63.2)
- React-RCTSettings (= 0.63.2)
- React-RCTText (= 0.63.2)
- React-RCTVibration (= 0.63.2)
- React-callinvoker (0.63.2)
- React-Core (0.63.2):
- RCTRequired (= 0.63.3)
- React-Core (= 0.63.3)
- React (0.63.3):
- React-Core (= 0.63.3)
- React-Core/DevSupport (= 0.63.3)
- React-Core/RCTWebSocket (= 0.63.3)
- React-RCTActionSheet (= 0.63.3)
- React-RCTAnimation (= 0.63.3)
- React-RCTBlob (= 0.63.3)
- React-RCTImage (= 0.63.3)
- React-RCTLinking (= 0.63.3)
- React-RCTNetwork (= 0.63.3)
- React-RCTSettings (= 0.63.3)
- React-RCTText (= 0.63.3)
- React-RCTVibration (= 0.63.3)
- React-callinvoker (0.63.3)
- React-Core (0.63.3):
- Folly (= 2020.01.13.00)
- glog
- React-Core/Default (= 0.63.2)
- React-cxxreact (= 0.63.2)
- React-jsi (= 0.63.2)
- React-jsiexecutor (= 0.63.2)
- React-Core/Default (= 0.63.3)
- React-cxxreact (= 0.63.3)
- React-jsi (= 0.63.3)
- React-jsiexecutor (= 0.63.3)
- Yoga
- React-Core/CoreModulesHeaders (0.63.2):
- React-Core/CoreModulesHeaders (0.63.3):
- Folly (= 2020.01.13.00)
- glog
- React-Core/Default
- React-cxxreact (= 0.63.2)
- React-jsi (= 0.63.2)
- React-jsiexecutor (= 0.63.2)
- React-cxxreact (= 0.63.3)
- React-jsi (= 0.63.3)
- React-jsiexecutor (= 0.63.3)
- Yoga
- React-Core/Default (0.63.2):
- React-Core/Default (0.63.3):
- Folly (= 2020.01.13.00)
- glog
- React-cxxreact (= 0.63.2)
- React-jsi (= 0.63.2)
- React-jsiexecutor (= 0.63.2)
- React-cxxreact (= 0.63.3)
- React-jsi (= 0.63.3)
- React-jsiexecutor (= 0.63.3)
- Yoga
- React-Core/DevSupport (0.63.2):
- React-Core/DevSupport (0.63.3):
- Folly (= 2020.01.13.00)
- glog
- React-Core/Default (= 0.63.2)
- React-Core/RCTWebSocket (= 0.63.2)
- React-cxxreact (= 0.63.2)
- React-jsi (= 0.63.2)
- React-jsiexecutor (= 0.63.2)
- React-jsinspector (= 0.63.2)
- React-Core/Default (= 0.63.3)
- React-Core/RCTWebSocket (= 0.63.3)
- React-cxxreact (= 0.63.3)
- React-jsi (= 0.63.3)
- React-jsiexecutor (= 0.63.3)
- React-jsinspector (= 0.63.3)
- Yoga
- React-Core/RCTActionSheetHeaders (0.63.2):
- React-Core/RCTActionSheetHeaders (0.63.3):
- Folly (= 2020.01.13.00)
- glog
- React-Core/Default
- React-cxxreact (= 0.63.2)
- React-jsi (= 0.63.2)
- React-jsiexecutor (= 0.63.2)
- React-cxxreact (= 0.63.3)
- React-jsi (= 0.63.3)
- React-jsiexecutor (= 0.63.3)
- Yoga
- React-Core/RCTAnimationHeaders (0.63.2):
- React-Core/RCTAnimationHeaders (0.63.3):
- Folly (= 2020.01.13.00)
- glog
- React-Core/Default
- React-cxxreact (= 0.63.2)
- React-jsi (= 0.63.2)
- React-jsiexecutor (= 0.63.2)
- React-cxxreact (= 0.63.3)
- React-jsi (= 0.63.3)
- React-jsiexecutor (= 0.63.3)
- Yoga
- React-Core/RCTBlobHeaders (0.63.2):
- React-Core/RCTBlobHeaders (0.63.3):
- Folly (= 2020.01.13.00)
- glog
- React-Core/Default
- React-cxxreact (= 0.63.2)
- React-jsi (= 0.63.2)
- React-jsiexecutor (= 0.63.2)
- React-cxxreact (= 0.63.3)
- React-jsi (= 0.63.3)
- React-jsiexecutor (= 0.63.3)
- Yoga
- React-Core/RCTImageHeaders (0.63.2):
- React-Core/RCTImageHeaders (0.63.3):
- Folly (= 2020.01.13.00)
- glog
- React-Core/Default
- React-cxxreact (= 0.63.2)
- React-jsi (= 0.63.2)
- React-jsiexecutor (= 0.63.2)
- React-cxxreact (= 0.63.3)
- React-jsi (= 0.63.3)
- React-jsiexecutor (= 0.63.3)
- Yoga
- React-Core/RCTLinkingHeaders (0.63.2):
- React-Core/RCTLinkingHeaders (0.63.3):
- Folly (= 2020.01.13.00)
- glog
- React-Core/Default
- React-cxxreact (= 0.63.2)
- React-jsi (= 0.63.2)
- React-jsiexecutor (= 0.63.2)
- React-cxxreact (= 0.63.3)
- React-jsi (= 0.63.3)
- React-jsiexecutor (= 0.63.3)
- Yoga
- React-Core/RCTNetworkHeaders (0.63.2):
- React-Core/RCTNetworkHeaders (0.63.3):
- Folly (= 2020.01.13.00)
- glog
- React-Core/Default
- React-cxxreact (= 0.63.2)
- React-jsi (= 0.63.2)
- React-jsiexecutor (= 0.63.2)
- React-cxxreact (= 0.63.3)
- React-jsi (= 0.63.3)
- React-jsiexecutor (= 0.63.3)
- Yoga
- React-Core/RCTSettingsHeaders (0.63.2):
- React-Core/RCTSettingsHeaders (0.63.3):
- Folly (= 2020.01.13.00)
- glog
- React-Core/Default
- React-cxxreact (= 0.63.2)
- React-jsi (= 0.63.2)
- React-jsiexecutor (= 0.63.2)
- React-cxxreact (= 0.63.3)
- React-jsi (= 0.63.3)
- React-jsiexecutor (= 0.63.3)
- Yoga
- React-Core/RCTTextHeaders (0.63.2):
- React-Core/RCTTextHeaders (0.63.3):
- Folly (= 2020.01.13.00)
- glog
- React-Core/Default
- React-cxxreact (= 0.63.2)
- React-jsi (= 0.63.2)
- React-jsiexecutor (= 0.63.2)
- React-cxxreact (= 0.63.3)
- React-jsi (= 0.63.3)
- React-jsiexecutor (= 0.63.3)
- Yoga
- React-Core/RCTVibrationHeaders (0.63.2):
- React-Core/RCTVibrationHeaders (0.63.3):
- Folly (= 2020.01.13.00)
- glog
- React-Core/Default
- React-cxxreact (= 0.63.2)
- React-jsi (= 0.63.2)
- React-jsiexecutor (= 0.63.2)
- React-cxxreact (= 0.63.3)
- React-jsi (= 0.63.3)
- React-jsiexecutor (= 0.63.3)
- Yoga
- React-Core/RCTWebSocket (0.63.2):
- React-Core/RCTWebSocket (0.63.3):
- Folly (= 2020.01.13.00)
- glog
- React-Core/Default (= 0.63.2)
- React-cxxreact (= 0.63.2)
- React-jsi (= 0.63.2)
- React-jsiexecutor (= 0.63.2)
- React-Core/Default (= 0.63.3)
- React-cxxreact (= 0.63.3)
- React-jsi (= 0.63.3)
- React-jsiexecutor (= 0.63.3)
- Yoga
- React-CoreModules (0.63.2):
- FBReactNativeSpec (= 0.63.2)
- React-CoreModules (0.63.3):
- FBReactNativeSpec (= 0.63.3)
- Folly (= 2020.01.13.00)
- RCTTypeSafety (= 0.63.2)
- React-Core/CoreModulesHeaders (= 0.63.2)
- React-jsi (= 0.63.2)
- React-RCTImage (= 0.63.2)
- ReactCommon/turbomodule/core (= 0.63.2)
- React-cxxreact (0.63.2):
- RCTTypeSafety (= 0.63.3)
- React-Core/CoreModulesHeaders (= 0.63.3)
- React-jsi (= 0.63.3)
- React-RCTImage (= 0.63.3)
- ReactCommon/turbomodule/core (= 0.63.3)
- React-cxxreact (0.63.3):
- boost-for-react-native (= 1.63.0)
- DoubleConversion
- Folly (= 2020.01.13.00)
- glog
- React-callinvoker (= 0.63.2)
- React-jsinspector (= 0.63.2)
- React-jsi (0.63.2):
- React-callinvoker (= 0.63.3)
- React-jsinspector (= 0.63.3)
- React-jsi (0.63.3):
- boost-for-react-native (= 1.63.0)
- DoubleConversion
- Folly (= 2020.01.13.00)
- glog
- React-jsi/Default (= 0.63.2)
- React-jsi/Default (0.63.2):
- React-jsi/Default (= 0.63.3)
- React-jsi/Default (0.63.3):
- boost-for-react-native (= 1.63.0)
- DoubleConversion
- Folly (= 2020.01.13.00)
- glog
- React-jsiexecutor (0.63.2):
- React-jsiexecutor (0.63.3):
- DoubleConversion
- Folly (= 2020.01.13.00)
- glog
- React-cxxreact (= 0.63.2)
- React-jsi (= 0.63.2)
- React-jsinspector (0.63.2)
- react-native-update (5.7.2):
- React-cxxreact (= 0.63.3)
- React-jsi (= 0.63.3)
- React-jsinspector (0.63.3)
- react-native-update (5.9.1):
- React
- react-native-update/BSDiff (= 5.7.2)
- react-native-update/RCTPushy (= 5.7.2)
- react-native-update/BSDiff (= 5.9.1)
- react-native-update/RCTPushy (= 5.9.1)
- SSZipArchive
- react-native-update/BSDiff (5.7.2):
- react-native-update/BSDiff (5.9.1):
- React
- SSZipArchive
- react-native-update/RCTPushy (5.7.2):
- react-native-update/RCTPushy (5.9.1):
- React
- SSZipArchive
- React-RCTActionSheet (0.63.2):
- React-Core/RCTActionSheetHeaders (= 0.63.2)
- React-RCTAnimation (0.63.2):
- FBReactNativeSpec (= 0.63.2)
- react-native-webview (10.9.2):
- React-Core
- React-RCTActionSheet (0.63.3):
- React-Core/RCTActionSheetHeaders (= 0.63.3)
- React-RCTAnimation (0.63.3):
- FBReactNativeSpec (= 0.63.3)
- Folly (= 2020.01.13.00)
- RCTTypeSafety (= 0.63.2)
- React-Core/RCTAnimationHeaders (= 0.63.2)
- React-jsi (= 0.63.2)
- ReactCommon/turbomodule/core (= 0.63.2)
- React-RCTBlob (0.63.2):
- FBReactNativeSpec (= 0.63.2)
- RCTTypeSafety (= 0.63.3)
- React-Core/RCTAnimationHeaders (= 0.63.3)
- React-jsi (= 0.63.3)
- ReactCommon/turbomodule/core (= 0.63.3)
- React-RCTBlob (0.63.3):
- FBReactNativeSpec (= 0.63.3)
- Folly (= 2020.01.13.00)
- React-Core/RCTBlobHeaders (= 0.63.2)
- React-Core/RCTWebSocket (= 0.63.2)
- React-jsi (= 0.63.2)
- React-RCTNetwork (= 0.63.2)
- ReactCommon/turbomodule/core (= 0.63.2)
- React-RCTImage (0.63.2):
- FBReactNativeSpec (= 0.63.2)
- React-Core/RCTBlobHeaders (= 0.63.3)
- React-Core/RCTWebSocket (= 0.63.3)
- React-jsi (= 0.63.3)
- React-RCTNetwork (= 0.63.3)
- ReactCommon/turbomodule/core (= 0.63.3)
- React-RCTImage (0.63.3):
- FBReactNativeSpec (= 0.63.3)
- Folly (= 2020.01.13.00)
- RCTTypeSafety (= 0.63.2)
- React-Core/RCTImageHeaders (= 0.63.2)
- React-jsi (= 0.63.2)
- React-RCTNetwork (= 0.63.2)
- ReactCommon/turbomodule/core (= 0.63.2)
- React-RCTLinking (0.63.2):
- FBReactNativeSpec (= 0.63.2)
- React-Core/RCTLinkingHeaders (= 0.63.2)
- React-jsi (= 0.63.2)
- ReactCommon/turbomodule/core (= 0.63.2)
- React-RCTNetwork (0.63.2):
- FBReactNativeSpec (= 0.63.2)
- RCTTypeSafety (= 0.63.3)
- React-Core/RCTImageHeaders (= 0.63.3)
- React-jsi (= 0.63.3)
- React-RCTNetwork (= 0.63.3)
- ReactCommon/turbomodule/core (= 0.63.3)
- React-RCTLinking (0.63.3):
- FBReactNativeSpec (= 0.63.3)
- React-Core/RCTLinkingHeaders (= 0.63.3)
- React-jsi (= 0.63.3)
- ReactCommon/turbomodule/core (= 0.63.3)
- React-RCTNetwork (0.63.3):
- FBReactNativeSpec (= 0.63.3)
- Folly (= 2020.01.13.00)
- RCTTypeSafety (= 0.63.2)
- React-Core/RCTNetworkHeaders (= 0.63.2)
- React-jsi (= 0.63.2)
- ReactCommon/turbomodule/core (= 0.63.2)
- React-RCTSettings (0.63.2):
- FBReactNativeSpec (= 0.63.2)
- RCTTypeSafety (= 0.63.3)
- React-Core/RCTNetworkHeaders (= 0.63.3)
- React-jsi (= 0.63.3)
- ReactCommon/turbomodule/core (= 0.63.3)
- React-RCTSettings (0.63.3):
- FBReactNativeSpec (= 0.63.3)
- Folly (= 2020.01.13.00)
- RCTTypeSafety (= 0.63.2)
- React-Core/RCTSettingsHeaders (= 0.63.2)
- React-jsi (= 0.63.2)
- ReactCommon/turbomodule/core (= 0.63.2)
- React-RCTText (0.63.2):
- React-Core/RCTTextHeaders (= 0.63.2)
- React-RCTVibration (0.63.2):
- FBReactNativeSpec (= 0.63.2)
- RCTTypeSafety (= 0.63.3)
- React-Core/RCTSettingsHeaders (= 0.63.3)
- React-jsi (= 0.63.3)
- ReactCommon/turbomodule/core (= 0.63.3)
- React-RCTText (0.63.3):
- React-Core/RCTTextHeaders (= 0.63.3)
- React-RCTVibration (0.63.3):
- FBReactNativeSpec (= 0.63.3)
- Folly (= 2020.01.13.00)
- React-Core/RCTVibrationHeaders (= 0.63.2)
- React-jsi (= 0.63.2)
- ReactCommon/turbomodule/core (= 0.63.2)
- ReactCommon/turbomodule/core (0.63.2):
- React-Core/RCTVibrationHeaders (= 0.63.3)
- React-jsi (= 0.63.3)
- ReactCommon/turbomodule/core (= 0.63.3)
- ReactCommon/turbomodule/core (0.63.3):
- DoubleConversion
- Folly (= 2020.01.13.00)
- glog
- React-callinvoker (= 0.63.2)
- React-Core (= 0.63.2)
- React-cxxreact (= 0.63.2)
- React-jsi (= 0.63.2)
- React-callinvoker (= 0.63.3)
- React-Core (= 0.63.3)
- React-cxxreact (= 0.63.3)
- React-jsi (= 0.63.3)
- SSZipArchive (2.2.3)
- Yoga (1.14.0)
- YogaKit (1.18.1):
@@ -350,6 +352,7 @@ DEPENDENCIES:
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
- react-native-update (from `../../..`)
- react-native-webview (from `../node_modules/react-native-webview`)
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
- React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
- React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
@@ -411,6 +414,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/jsinspector"
react-native-update:
:path: "../../.."
react-native-webview:
:path: "../node_modules/react-native-webview"
React-RCTActionSheet:
:path: "../node_modules/react-native/Libraries/ActionSheetIOS"
React-RCTAnimation:
@@ -439,8 +444,8 @@ SPEC CHECKSUMS:
CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845
CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f
DoubleConversion: cde416483dac037923206447da6e1454df403714
FBLazyVector: 3ef4a7f62e7db01092f9d517d2ebc0d0677c4a37
FBReactNativeSpec: dc7fa9088f0f2a998503a352b0554d69a4391c5a
FBLazyVector: 878b59e31113e289e275165efbe4b54fa614d43d
FBReactNativeSpec: 7da9338acfb98d4ef9e5536805a0704572d33c2f
Flipper: be611d4b742d8c87fbae2ca5f44603a02539e365
Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41
Flipper-Folly: c12092ea368353b58e992843a990a3225d4533c3
@@ -451,29 +456,30 @@ SPEC CHECKSUMS:
Folly: b73c3869541e86821df3c387eb0af5f65addfab4
glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3
OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355
RCTRequired: f13f25e7b12f925f1f6a6a8c69d929a03c0129fe
RCTTypeSafety: 44982c5c8e43ff4141eb519a8ddc88059acd1f3a
React: e1c65dd41cb9db13b99f24608e47dd595f28ca9a
React-callinvoker: 552a6a6bc8b3bb794cf108ad59e5a9e2e3b4fc98
React-Core: 9d341e725dc9cd2f49e4c49ad1fc4e8776aa2639
React-CoreModules: 5335e168165da7f7083ce7147768d36d3e292318
React-cxxreact: d3261ec5f7d11743fbf21e263a34ea51d1f13ebc
React-jsi: 54245e1d5f4b690dec614a73a3795964eeef13a8
React-jsiexecutor: 8ca588cc921e70590820ce72b8789b02c67cce38
React-jsinspector: b14e62ebe7a66e9231e9581279909f2fc3db6606
react-native-update: 7602220eccf4ccac05bc90035a541300f2c0189a
React-RCTActionSheet: 910163b6b09685a35c4ebbc52b66d1bfbbe39fc5
React-RCTAnimation: 9a883bbe1e9d2e158d4fb53765ed64c8dc2200c6
React-RCTBlob: 39cf0ece1927996c4466510e25d2105f67010e13
React-RCTImage: de355d738727b09ad3692f2a979affbd54b5f378
React-RCTLinking: 8122f221d395a63364b2c0078ce284214bd04575
React-RCTNetwork: 8f96c7b49ea6a0f28f98258f347b6ad218bc0830
React-RCTSettings: 8a49622aff9c1925f5455fa340b6fe4853d64ab6
React-RCTText: 1b6773e776e4b33f90468c20fe3b16ca3e224bb8
React-RCTVibration: 4d2e726957f4087449739b595f107c0d4b6c2d2d
ReactCommon: a0a1edbebcac5e91338371b72ffc66aa822792ce
RCTRequired: 48884c74035a0b5b76dbb7a998bd93bcfc5f2047
RCTTypeSafety: edf4b618033c2f1c5b7bc3d90d8e085ed95ba2ab
React: f36e90f3ceb976546e97df3403e37d226f79d0e3
React-callinvoker: 18874f621eb96625df7a24a7dc8d6e07391affcd
React-Core: ac3d816b8e3493970153f4aaf0cff18af0bb95e6
React-CoreModules: 4016d3a4e518bcfc4f5a51252b5a05692ca6f0e1
React-cxxreact: ffc9129013b87cb36cf3f30a86695a3c397b0f99
React-jsi: df07aa95b39c5be3e41199921509bfa929ed2b9d
React-jsiexecutor: b56c03e61c0dd5f5801255f2160a815f4a53d451
React-jsinspector: 8e68ffbfe23880d3ee9bafa8be2777f60b25cbe2
react-native-update: 74ae0ad726a7cd5194b377361b7a3e921a65201c
react-native-webview: 4e96d493f9f90ba4f03b28933f30b2964df07e39
React-RCTActionSheet: 53ea72699698b0b47a6421cb1c8b4ab215a774aa
React-RCTAnimation: 1befece0b5183c22ae01b966f5583f42e69a83c2
React-RCTBlob: 0b284339cbe4b15705a05e2313a51c6d8b51fa40
React-RCTImage: d1756599ebd4dc2cb19d1682fe67c6b976658387
React-RCTLinking: 9af0a51c6d6a4dd1674daadafffc6d03033a6d18
React-RCTNetwork: 332c83929cc5eae0b3bbca4add1d668e1fc18bda
React-RCTSettings: d6953772cfd55f2c68ad72b7ef29efc7ec49f773
React-RCTText: 65a6de06a7389098ce24340d1d3556015c38f746
React-RCTVibration: 8e9fb25724a0805107fc1acc9075e26f814df454
ReactCommon: 4167844018c9ed375cc01a843e9ee564399e53c3
SSZipArchive: 62d4947b08730e4cda640473b0066d209ff033c9
Yoga: 7740b94929bbacbddda59bf115b5317e9a161598
Yoga: 7d13633d129fd179e01b8953d38d47be90db185a
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
PODFILE CHECKSUM: 449e295f5242b426c8459fd24a8812cc985916d0

View File

@@ -7,12 +7,14 @@
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
"lint": "eslint .",
"apk": "(cd android && ./gradlew aR)"
},
"dependencies": {
"react": "16.13.1",
"react-native": "0.63.2",
"react-native-update": "link:../.."
"react-native": "0.63.3",
"react-native-update": "link:../..",
"react-native-webview": "^10.9.2"
},
"devDependencies": {
"@babel/core": "^7.8.4",

View File

@@ -8,7 +8,6 @@ import {
TouchableOpacity,
Linking,
Image,
NativeModules,
} from 'react-native';
import {
@@ -163,6 +162,7 @@ export default class App extends Component {
<TouchableOpacity onPress={this.checkUpdate}>
<Text style={styles.instructions}>点击这里检查更新</Text>
</TouchableOpacity>
{/* <WebView style={{flex:1}} source={{uri: require('../www/index.html')}}/> */}
</View>
);
}

22
Example/testHotUpdate/src/www/echarts.min.js vendored Executable file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- 引入 ECharts 文件 -->
<script src="echarts.min.js"></script>
</head>
<body>
<!-- 为 ECharts 准备一个具备大小(宽高)的 DOM -->
<div id="main" style="width: 600px;height:400px;"></div>
<script type="text/javascript">
// 基于准备好的dom初始化echarts实例
var myChart = echarts.init(document.getElementById('main'));
// 指定图表的配置项和数据
var option = {
title: {
text: 'ECharts 入门示例'
},
tooltip: {},
legend: {
data:['销量']
},
xAxis: {
data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
},
yAxis: {},
series: [{
name: '销量',
type: 'bar',
data: [5, 20, 36, 10, 10, 20]
}]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
</script>
</body>
</html>

View File

@@ -1242,12 +1242,23 @@
dependencies:
serve-static "^1.13.1"
"@react-native-community/cli-platform-android@^4.7.0":
version "4.11.0"
resolved "https://registry.npm.taobao.org/@react-native-community/cli-platform-android/download/@react-native-community/cli-platform-android-4.11.0.tgz#0ce9b88ed8b6b0ef962af49d980eb53433c17a84"
integrity sha1-DOm4jti2sO+WKvSdmA61NDPBeoQ=
"@react-native-community/cli-hermes@^4.13.0":
version "4.13.0"
resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-4.13.0.tgz#6243ed9c709dad5e523f1ccd7d21066b32f2899d"
integrity sha512-oG+w0Uby6rSGsUkJGLvMQctZ5eVRLLfhf84lLyz942OEDxFRa9U19YJxOe9FmgCKtotbYiM3P/XhK+SVCuerPQ==
dependencies:
"@react-native-community/cli-tools" "^4.11.0"
"@react-native-community/cli-platform-android" "^4.13.0"
"@react-native-community/cli-tools" "^4.13.0"
chalk "^3.0.0"
hermes-profile-transformer "^0.0.6"
ip "^1.1.5"
"@react-native-community/cli-platform-android@^4.10.0", "@react-native-community/cli-platform-android@^4.13.0":
version "4.13.0"
resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-4.13.0.tgz#922681ec82ee1aadd993598b814df1152118be02"
integrity sha512-3i8sX8GklEytUZwPnojuoFbCjIRzMugCdzDIdZ9UNmi/OhD4/8mLGO0dgXfT4sMWjZwu3qjy45sFfk2zOAgHbA==
dependencies:
"@react-native-community/cli-tools" "^4.13.0"
chalk "^3.0.0"
execa "^1.0.0"
fs-extra "^8.1.0"
@@ -1258,12 +1269,12 @@
slash "^3.0.0"
xmldoc "^1.1.2"
"@react-native-community/cli-platform-ios@^4.7.0":
version "4.11.0"
resolved "https://registry.npm.taobao.org/@react-native-community/cli-platform-ios/download/@react-native-community/cli-platform-ios-4.11.0.tgz#5870bf5f2b3c01a0aa672a7c1f7f0fe13337c6b5"
integrity sha1-WHC/Xys8AaCqZyp8H38P4TM3xrU=
"@react-native-community/cli-platform-ios@^4.10.0":
version "4.13.0"
resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-4.13.0.tgz#a738915c68cac86df54e578b59a1311ea62b1aef"
integrity sha512-6THlTu8zp62efkzimfGr3VIuQJ2514o+vScZERJCV1xgEi8XtV7mb/ZKt9o6Y9WGxKKkc0E0b/aVAtgy+L27CA==
dependencies:
"@react-native-community/cli-tools" "^4.11.0"
"@react-native-community/cli-tools" "^4.13.0"
chalk "^3.0.0"
glob "^7.1.3"
js-yaml "^3.13.1"
@@ -1271,13 +1282,13 @@
plist "^3.0.1"
xcode "^2.0.0"
"@react-native-community/cli-server-api@^4.11.0":
version "4.11.0"
resolved "https://registry.npm.taobao.org/@react-native-community/cli-server-api/download/@react-native-community/cli-server-api-4.11.0.tgz#93887ab8496c9d89b53817297974670184be1191"
integrity sha1-k4h6uElsnYm1OBcpeXRnAYS+EZE=
"@react-native-community/cli-server-api@^4.13.0":
version "4.13.0"
resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-4.13.0.tgz#ef0e53fe0edc7356d62bca725ca47cb368f748a5"
integrity sha512-ER138ChLc1YYX7j9yE6fDm4DdNdsHThr+pla/B6iZoKje1r7TwymDdKaUvOsYalG7sWG9glW3bofcCq+Yh0Dvw==
dependencies:
"@react-native-community/cli-debugger-ui" "^4.9.0"
"@react-native-community/cli-tools" "^4.11.0"
"@react-native-community/cli-tools" "^4.13.0"
compression "^1.7.1"
connect "^3.6.5"
errorhandler "^1.5.0"
@@ -1285,10 +1296,10 @@
serve-static "^1.13.1"
ws "^1.1.0"
"@react-native-community/cli-tools@^4.11.0":
version "4.11.0"
resolved "https://registry.npm.taobao.org/@react-native-community/cli-tools/download/@react-native-community/cli-tools-4.11.0.tgz#a53a51da76468a37f89ef7db808acc1d3c5f9cea"
integrity sha1-pTpR2nZGijf4nvfbgIrMHTxfnOo=
"@react-native-community/cli-tools@^4.13.0":
version "4.13.0"
resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-4.13.0.tgz#b406463d33af16cedc4305a9a9257ed32845cf1b"
integrity sha512-s4f489h5+EJksn4CfheLgv5PGOM0CDmK1UEBLw2t/ncWs3cW2VI7vXzndcd/WJHTv3GntJhXDcJMuL+Z2IAOgg==
dependencies:
chalk "^3.0.0"
lodash "^4.17.15"
@@ -1302,15 +1313,16 @@
resolved "https://registry.npm.taobao.org/@react-native-community/cli-types/download/@react-native-community/cli-types-4.10.1.tgz#d68a2dcd1649d3b3774823c64e5e9ce55bfbe1c9"
integrity sha1-1ootzRZJ07N3SCPGTl6c5Vv74ck=
"@react-native-community/cli@^4.7.0":
version "4.12.0"
resolved "https://registry.npm.taobao.org/@react-native-community/cli/download/@react-native-community/cli-4.12.0.tgz#42ca3eacd4b4ba2bd5126aba6a032952e66835b5"
integrity sha1-Qso+rNS0uivVEmq6agMpUuZoNbU=
"@react-native-community/cli@^4.10.0":
version "4.13.0"
resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-4.13.0.tgz#04d5032f9b2b423c61ceef6be83b1bcc8a37db75"
integrity sha512-R+1VehIQ6VTLf+e7YOwzJk0F9tstfeSC4xy7oT6GSgB3FnXbTJGHFUp4siyO68Ae/gzGqt8SiUO145teWkP+ZA==
dependencies:
"@hapi/joi" "^15.0.3"
"@react-native-community/cli-debugger-ui" "^4.9.0"
"@react-native-community/cli-server-api" "^4.11.0"
"@react-native-community/cli-tools" "^4.11.0"
"@react-native-community/cli-hermes" "^4.13.0"
"@react-native-community/cli-server-api" "^4.13.0"
"@react-native-community/cli-tools" "^4.13.0"
"@react-native-community/cli-types" "^4.10.1"
chalk "^3.0.0"
command-exists "^1.2.8"
@@ -2746,6 +2758,11 @@ escape-html@~1.0.3:
resolved "https://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
escape-string-regexp@2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-2.0.0.tgz?cache=0&sync_timestamp=1587627212242&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344"
integrity sha1-owME6Z2qMuI7L9IPUbq9B8/8o0Q=
escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
@@ -3518,6 +3535,13 @@ hermes-engine@~0.5.0:
resolved "https://registry.npm.taobao.org/hermes-engine/download/hermes-engine-0.5.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhermes-engine%2Fdownload%2Fhermes-engine-0.5.1.tgz#601115e4b1e0a17d9aa91243b96277de4e926e09"
integrity sha1-YBEV5LHgoX2aqRJDuWJ33k6Sbgk=
hermes-profile-transformer@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/hermes-profile-transformer/-/hermes-profile-transformer-0.0.6.tgz#bd0f5ecceda80dd0ddaae443469ab26fb38fc27b"
integrity sha512-cnN7bQUm65UWOy6cbGcCcZ3rpwW8Q/j4OP5aWRhEry4Z2t2aR1cjrbp0BS+KiBN0smvP1caBgAuxutvyvJILzQ==
dependencies:
source-map "^0.7.3"
hosted-git-info@^2.1.4:
version "2.8.5"
resolved "https://registry.npm.taobao.org/hosted-git-info/download/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c"
@@ -3684,7 +3708,7 @@ internal-slot@^1.0.2:
has "^1.0.3"
side-channel "^1.0.2"
invariant@^2.2.4:
invariant@2.2.4, invariant@^2.2.4:
version "2.2.4"
resolved "https://registry.npm.taobao.org/invariant/download/invariant-2.2.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finvariant%2Fdownload%2Finvariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
integrity sha1-YQ88ksk1nOHbYW5TgAjSP/NRWOY=
@@ -3696,6 +3720,11 @@ ip-regex@^2.1.0:
resolved "https://registry.npm.taobao.org/ip-regex/download/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9"
integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=
ip@^1.1.5:
version "1.1.5"
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a"
integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=
is-accessor-descriptor@^0.1.6:
version "0.1.6"
resolved "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6"
@@ -5936,15 +5965,23 @@ react-is@^16.8.1, react-is@^16.8.4:
version "0.0.0"
uid ""
react-native@0.63.2:
version "0.63.2"
resolved "https://registry.npm.taobao.org/react-native/download/react-native-0.63.2.tgz#eaebf3430577b37fbd66ef228a86b3408259ef8e"
integrity sha1-6uvzQwV3s3+9Zu8iioazQIJZ744=
react-native-webview@^10.9.2:
version "10.9.2"
resolved "https://registry.npm.taobao.org/react-native-webview/download/react-native-webview-10.9.2.tgz#6dbfcfefb0684a6665e346c0eca8040cbdb5fb75"
integrity sha1-bb/P77BoSmZl40bA7KgEDL21+3U=
dependencies:
escape-string-regexp "2.0.0"
invariant "2.2.4"
react-native@0.63.3:
version "0.63.3"
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.63.3.tgz#4a7f6540e049ff41810887bbd1125abc4672f3bf"
integrity sha512-71wq13uNo5W8QVQnFlnzZ3AD+XgUBYGhpsxysQFW/hJ8GAt/J5o+Bvhy81FXichp6IBDJDh/JgfHH2gNji8dFA==
dependencies:
"@babel/runtime" "^7.0.0"
"@react-native-community/cli" "^4.7.0"
"@react-native-community/cli-platform-android" "^4.7.0"
"@react-native-community/cli-platform-ios" "^4.7.0"
"@react-native-community/cli" "^4.10.0"
"@react-native-community/cli-platform-android" "^4.10.0"
"@react-native-community/cli-platform-ios" "^4.10.0"
abort-controller "^3.0.0"
anser "^1.4.9"
base64-js "^1.1.2"

View File

@@ -11,7 +11,7 @@
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
android:resource="@xml/pushy_file_paths" />
</provider>
</application>
</manifest>

View File

@@ -489,6 +489,7 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
if (UpdateContext.DEBUG) {
e.printStackTrace();
}
Log.e("pushy", "download task failed", e);
params[0].listener.onDownloadFailed(e);
}
return null;

View File

@@ -31,13 +31,14 @@ import static android.support.v4.content.FileProvider.getUriForFile;
/**
* Created by tdzl2003 on 3/31/16.
*/
public class UpdateModule extends ReactContextBaseJavaModule{
public class UpdateModule extends ReactContextBaseJavaModule {
UpdateContext updateContext;
public static ReactApplicationContext mContext;
public UpdateModule(ReactApplicationContext reactContext, UpdateContext updateContext) {
super(reactContext);
this.updateContext = updateContext;
mContext=reactContext;
mContext = reactContext;
}
public UpdateModule(ReactApplicationContext reactContext) {
@@ -73,7 +74,7 @@ public class UpdateModule extends ReactContextBaseJavaModule{
}
@ReactMethod
public void downloadUpdate(ReadableMap options, final Promise promise){
public void downloadUpdate(ReadableMap options, final Promise promise) {
String url = options.getString("updateUrl");
String hash = options.getString("hash");
updateContext.downloadFullUpdate(url, hash, new UpdateContext.DownloadFileListener() {
@@ -90,7 +91,7 @@ public class UpdateModule extends ReactContextBaseJavaModule{
}
@ReactMethod
public void downloadAndInstallApk(ReadableMap options, final Promise promise){
public void downloadAndInstallApk(ReadableMap options, final Promise promise) {
String url = options.getString("url");
String hash = options.getString("hash");
String target = options.getString("target");
@@ -116,17 +117,18 @@ public class UpdateModule extends ReactContextBaseJavaModule{
}
public static void installApk(File toInstall) {
Uri apkUri;
Intent intent;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
Uri apkUri = getUriForFile(mContext, mContext.getPackageName() + ".pushy.fileprovider", toInstall);
Intent intent = new Intent(Intent.ACTION_INSTALL_PACKAGE);
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);
mContext.startActivity(intent);
} else {
Uri apkUri = Uri.fromFile(toInstall);
Intent intent = new Intent(Intent.ACTION_VIEW);
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);
@@ -135,9 +137,12 @@ public class UpdateModule extends ReactContextBaseJavaModule{
@ReactMethod
public void downloadPatchFromPackage(ReadableMap options, final Promise promise){
public void downloadPatchFromPackage(ReadableMap options, final Promise promise) {
String url = options.getString("updateUrl");
String hash = options.getString("hash");
if (hash == null) {
hash = options.getString("hashName");
}
updateContext.downloadPatchFromApk(url, hash, new UpdateContext.DownloadFileListener() {
@Override
public void onDownloadCompleted(DownloadTaskParams params) {
@@ -152,10 +157,16 @@ public class UpdateModule extends ReactContextBaseJavaModule{
}
@ReactMethod
public void downloadPatchFromPpk(ReadableMap options, final Promise promise){
public void downloadPatchFromPpk(ReadableMap options, final Promise promise) {
String url = options.getString("updateUrl");
String hash = options.getString("hash");
if (hash == null) {
hash = options.getString("hashName");
}
String originHash = options.getString("originHash");
if (originHash == null) {
originHash = options.getString(("originHashName"));
}
updateContext.downloadPatchFromPpk(url, hash, originHash, new UpdateContext.DownloadFileListener() {
@Override
public void onDownloadCompleted(DownloadTaskParams params) {
@@ -171,7 +182,8 @@ public class UpdateModule extends ReactContextBaseJavaModule{
@ReactMethod
public void reloadUpdate(ReadableMap options) {
final String hash = options.getString("hash");
final String hash = options.getString("hash") == null ?
options.getString("hashName") : options.getString("hash");
UiThreadUtil.runOnUiThread(new Runnable() {
@Override
@@ -199,7 +211,7 @@ public class UpdateModule extends ReactContextBaseJavaModule{
try {
instanceManager.recreateReactContextInBackground();
} catch(Throwable err) {
} catch (Throwable err) {
activity.recreate();
}
@@ -212,7 +224,8 @@ public class UpdateModule extends ReactContextBaseJavaModule{
@ReactMethod
public void setNeedUpdate(ReadableMap options) {
final String hash = options.getString("hash");
final String hash = options.getString("hash") == null ?
options.getString("hashName") : options.getString("hash");
UiThreadUtil.runOnUiThread(new Runnable() {
@Override

View File

@@ -1,3 +1,5 @@
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<files-path name="." path="."/>
<files-path
name="pushy"
path="." />
</paths>

View File

@@ -84,7 +84,6 @@ RCT_EXPORT_MODULE(RCTPushy);
}
else {
NSString *curVersion = pushyInfo[paramCurrentVersion];
NSString *lastVersion = pushyInfo[paramLastVersion];
BOOL isFirstTime = [pushyInfo[paramIsFirstTime] boolValue];
BOOL isFirstLoadOK = [pushyInfo[paramIsFirstLoadOk] boolValue];
@@ -92,8 +91,42 @@ RCT_EXPORT_MODULE(RCTPushy);
NSString *loadVersion = curVersion;
BOOL needRollback = (!ignoreRollback && isFirstTime == NO && isFirstLoadOK == NO) || loadVersion.length<=0;
if (needRollback) {
loadVersion = lastVersion;
loadVersion = [self rollback];
}
else if (isFirstTime && !ignoreRollback){
// bundleURL may be called many times, ignore rollbacks before process restarted again.
ignoreRollback = true;
NSMutableDictionary *newInfo = [[NSMutableDictionary alloc] initWithDictionary:pushyInfo];
newInfo[paramIsFirstTime] = @(NO);
[defaults setObject:newInfo forKey:keyPushyInfo];
[defaults setObject:@(YES) forKey:keyFirstLoadMarked];
[defaults synchronize];
}
NSString *downloadDir = [RCTPushy downloadDir];
while (loadVersion.length) {
NSString *bundlePath = [[downloadDir stringByAppendingPathComponent:loadVersion] stringByAppendingPathComponent:BUNDLE_FILE_NAME];
if ([[NSFileManager defaultManager] fileExistsAtPath:bundlePath isDirectory:NULL]) {
NSURL *bundleURL = [NSURL fileURLWithPath:bundlePath];
return bundleURL;
} else {
RCTLogError(@"RCTPushy -- bundle version %@ not found", loadVersion);
loadVersion = [self rollback];
}
}
}
}
return [RCTPushy binaryBundleURL];
}
+ (NSString *) rollback {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSDictionary *pushyInfo = [defaults dictionaryForKey:keyPushyInfo];
NSString *lastVersion = pushyInfo[paramLastVersion];
NSString *curPackageVersion = [RCTPushy packageVersion];
if (lastVersion.length) {
// roll back to last version
[defaults setObject:@{paramCurrentVersion:lastVersion,
@@ -108,32 +141,7 @@ RCT_EXPORT_MODULE(RCTPushy);
}
[defaults setObject:@(YES) forKey:keyRolledBackMarked];
[defaults synchronize];
// ...need clear files later
}
else if (isFirstTime && !ignoreRollback){
// bundleURL may be called many times, ignore rollbacks before process restarted again.
ignoreRollback = true;
NSMutableDictionary *newInfo = [[NSMutableDictionary alloc] initWithDictionary:pushyInfo];
newInfo[paramIsFirstTime] = @(NO);
[defaults setObject:newInfo forKey:keyPushyInfo];
[defaults setObject:@(YES) forKey:keyFirstLoadMarked];
[defaults synchronize];
}
if (loadVersion.length) {
NSString *downloadDir = [RCTPushy downloadDir];
NSString *bundlePath = [[downloadDir stringByAppendingPathComponent:loadVersion] stringByAppendingPathComponent:BUNDLE_FILE_NAME];
if ([[NSFileManager defaultManager] fileExistsAtPath:bundlePath isDirectory:NULL]) {
NSURL *bundleURL = [NSURL fileURLWithPath:bundlePath];
return bundleURL;
}
}
}
}
return [RCTPushy binaryBundleURL];
return lastVersion;
}
+ (BOOL)requiresMainQueueSetup {
@@ -248,6 +256,9 @@ RCT_EXPORT_METHOD(downloadPatchFromPpk:(NSDictionary *)options
RCT_EXPORT_METHOD(setNeedUpdate:(NSDictionary *)options)
{
NSString *hash = options[@"hash"];
if (hash.length <= 0) {
hash = options[@"hashName"];
}
if (hash.length) {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *lastVersion = nil;
@@ -271,6 +282,9 @@ RCT_EXPORT_METHOD(setNeedUpdate:(NSDictionary *)options)
RCT_EXPORT_METHOD(reloadUpdate:(NSDictionary *)options)
{
NSString *hash = options[@"hash"];
if (hash.length <= 0) {
hash = options[@"hashName"];
}
if (hash.length) {
[self setNeedUpdate:options];
@@ -327,6 +341,9 @@ RCT_EXPORT_METHOD(markSuccess)
{
NSString *updateUrl = [RCTConvert NSString:options[@"updateUrl"]];
NSString *hash = [RCTConvert NSString:options[@"hash"]];
if (hash.length <= 0) {
hash = [RCTConvert NSString:options[@"hashName"]];;
}
if (updateUrl.length <= 0 || hash.length <= 0) {
callback([self errorWithMessage:ERROR_OPTIONS]);
return;

8
lib/index.d.ts vendored
View File

@@ -5,15 +5,19 @@ export const isFirstTime: boolean;
export const isRolledBack: boolean;
export interface ExpiredResult {
upToDate?: false;
expired: true;
downloadUrl: string;
}
export interface UpTodateResult {
expired?: false;
upToDate: true;
}
export interface UpdateAvailableResult {
expired?: false;
upToDate?: false;
update: true;
name: string; // version name
hash: string;
@@ -43,13 +47,13 @@ export function switchVersionLater(hash: string): void;
export function markSuccess(): void;
export async function downloadAndInstallApk({
export function downloadAndInstallApk({
url,
onDownloadProgress,
}: {
url: string;
onDownloadProgress?: (data: ProgressData) => void;
}): void;
}): Promise<void>;
/**
* @param {string} main - The main api endpoint

View File

@@ -1,6 +1,6 @@
{
"name": "react-native-update",
"version": "5.9.0",
"version": "5.10.0",
"description": "react-native hot update",
"main": "lib/index.js",
"scripts": {