@appzung/react-native-code-push 10.0.0-rc1 → 10.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CodePush.podspec +1 -0
- package/LICENSE.md +2 -2
- package/README.md +74 -95
- package/android/app/build.gradle +62 -18
- package/android/app/src/main/AndroidManifest.xml +2 -3
- package/android/app/src/main/AndroidManifestNew.xml +3 -0
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePush.java +21 -89
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushNativeModule.java +32 -3
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateManager.java +2 -2
- package/android/build.gradle +1 -11
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/gradle.properties +4 -20
- package/docs/advanced-usage.md +2 -2
- package/docs/api-android.md +12 -10
- package/docs/api-ios.md +5 -5
- package/docs/api-js.md +180 -178
- package/docs/code-signing.md +62 -0
- package/docs/migrating-to-v10.md +31 -0
- package/docs/setup-android.md +52 -79
- package/docs/setup-ios.md +31 -28
- package/docs/setup-windows.md +1 -0
- package/ios/CodePush/CodePush.m +13 -57
- package/lib/commonjs/CodePush.js +90 -0
- package/lib/commonjs/CodePush.js.map +1 -0
- package/lib/commonjs/allowRestart.js +12 -0
- package/lib/commonjs/allowRestart.js.map +1 -0
- package/lib/commonjs/checkForUpdates.js +105 -0
- package/lib/commonjs/checkForUpdates.js.map +1 -0
- package/lib/commonjs/clearUpdates.js +15 -0
- package/lib/commonjs/clearUpdates.js.map +1 -0
- package/lib/commonjs/disallowRestart.js +12 -0
- package/lib/commonjs/disallowRestart.js.map +1 -0
- package/lib/commonjs/enums/CheckFrequency.enum.js +25 -0
- package/lib/commonjs/enums/CheckFrequency.enum.js.map +1 -0
- package/lib/commonjs/enums/DeploymentStatus.enum.js +21 -0
- package/lib/commonjs/enums/DeploymentStatus.enum.js.map +1 -0
- package/lib/commonjs/enums/InstallMode.enum.js +35 -0
- package/lib/commonjs/enums/InstallMode.enum.js.map +1 -0
- package/lib/commonjs/enums/SyncStatus.enum.js +53 -0
- package/lib/commonjs/enums/SyncStatus.enum.js.map +1 -0
- package/lib/commonjs/enums/UpdateState.enum.js +29 -0
- package/lib/commonjs/enums/UpdateState.enum.js.map +1 -0
- package/lib/commonjs/getUpdateMetadata.js +25 -0
- package/lib/commonjs/getUpdateMetadata.js.map +1 -0
- package/lib/commonjs/index.js +195 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/internals/AcquisitionSdk.js +9 -0
- package/lib/commonjs/internals/AcquisitionSdk.js.map +1 -0
- package/lib/commonjs/internals/LocalPackageImplementation.js +29 -0
- package/lib/commonjs/internals/LocalPackageImplementation.js.map +1 -0
- package/lib/commonjs/internals/NativeRNAppZungCodePushModule.js +8 -0
- package/lib/commonjs/internals/NativeRNAppZungCodePushModule.js.map +1 -0
- package/lib/commonjs/internals/RNAppZungCodePushModuleSpec.js +6 -0
- package/lib/commonjs/internals/RNAppZungCodePushModuleSpec.js.map +1 -0
- package/lib/commonjs/internals/RemotePackageImplementation.js +49 -0
- package/lib/commonjs/internals/RemotePackageImplementation.js.map +1 -0
- package/lib/commonjs/internals/getConfiguration.js +15 -0
- package/lib/commonjs/internals/getConfiguration.js.map +1 -0
- package/lib/commonjs/internals/getCurrentPackage.js +12 -0
- package/lib/commonjs/internals/getCurrentPackage.js.map +1 -0
- package/lib/commonjs/internals/getPromisifiedSdk.js +49 -0
- package/lib/commonjs/internals/getPromisifiedSdk.js.map +1 -0
- package/lib/commonjs/internals/shouldUpdateBeIgnored.js +62 -0
- package/lib/commonjs/internals/shouldUpdateBeIgnored.js.map +1 -0
- package/lib/commonjs/internals/types.js +6 -0
- package/lib/commonjs/internals/types.js.map +1 -0
- package/lib/commonjs/internals/utils/log.js +11 -0
- package/lib/commonjs/internals/utils/log.js.map +1 -0
- package/lib/commonjs/internals/utils/request-fetch-adapter.js +50 -0
- package/lib/commonjs/internals/utils/request-fetch-adapter.js.map +1 -0
- package/lib/commonjs/internals/version.js +9 -0
- package/lib/commonjs/internals/version.js.map +1 -0
- package/lib/commonjs/notifyAppReady.js +83 -0
- package/lib/commonjs/notifyAppReady.js.map +1 -0
- package/lib/commonjs/reactNative.d.js +2 -0
- package/lib/commonjs/reactNative.d.js.map +1 -0
- package/lib/commonjs/restartApp.js +16 -0
- package/lib/commonjs/restartApp.js.map +1 -0
- package/lib/commonjs/sync.js +219 -0
- package/lib/commonjs/sync.js.map +1 -0
- package/lib/commonjs/types.js +6 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/module/CodePush.js +84 -0
- package/lib/module/CodePush.js.map +1 -0
- package/lib/module/allowRestart.js +9 -0
- package/lib/module/allowRestart.js.map +1 -0
- package/lib/module/checkForUpdates.js +101 -0
- package/lib/module/checkForUpdates.js.map +1 -0
- package/lib/module/clearUpdates.js +12 -0
- package/lib/module/clearUpdates.js.map +1 -0
- package/lib/module/disallowRestart.js +9 -0
- package/lib/module/disallowRestart.js.map +1 -0
- package/lib/module/enums/CheckFrequency.enum.js +21 -0
- package/lib/module/enums/CheckFrequency.enum.js.map +1 -0
- package/lib/module/enums/DeploymentStatus.enum.js +17 -0
- package/lib/module/enums/DeploymentStatus.enum.js.map +1 -0
- package/lib/module/enums/InstallMode.enum.js +32 -0
- package/lib/module/enums/InstallMode.enum.js.map +1 -0
- package/lib/module/enums/SyncStatus.enum.js +49 -0
- package/lib/module/enums/SyncStatus.enum.js.map +1 -0
- package/lib/module/enums/UpdateState.enum.js +26 -0
- package/lib/module/enums/UpdateState.enum.js.map +1 -0
- package/lib/module/getUpdateMetadata.js +21 -0
- package/lib/module/getUpdateMetadata.js.map +1 -0
- package/lib/module/index.js +19 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/internals/AcquisitionSdk.js +5 -0
- package/lib/module/internals/AcquisitionSdk.js.map +1 -0
- package/lib/module/internals/LocalPackageImplementation.js +24 -0
- package/lib/module/internals/LocalPackageImplementation.js.map +1 -0
- package/lib/module/internals/NativeRNAppZungCodePushModule.js +4 -0
- package/lib/module/internals/NativeRNAppZungCodePushModule.js.map +1 -0
- package/lib/module/internals/RNAppZungCodePushModuleSpec.js +4 -0
- package/lib/module/internals/RNAppZungCodePushModuleSpec.js.map +1 -0
- package/lib/module/internals/RemotePackageImplementation.js +44 -0
- package/lib/module/internals/RemotePackageImplementation.js.map +1 -0
- package/lib/module/internals/getConfiguration.js +11 -0
- package/lib/module/internals/getConfiguration.js.map +1 -0
- package/lib/module/internals/getCurrentPackage.js +8 -0
- package/lib/module/internals/getCurrentPackage.js.map +1 -0
- package/lib/module/internals/getPromisifiedSdk.js +45 -0
- package/lib/module/internals/getPromisifiedSdk.js.map +1 -0
- package/lib/module/internals/shouldUpdateBeIgnored.js +58 -0
- package/lib/module/internals/shouldUpdateBeIgnored.js.map +1 -0
- package/lib/module/internals/types.js +4 -0
- package/lib/module/internals/types.js.map +1 -0
- package/lib/module/internals/utils/log.js +7 -0
- package/lib/module/internals/utils/log.js.map +1 -0
- package/lib/module/internals/utils/request-fetch-adapter.js +46 -0
- package/lib/module/internals/utils/request-fetch-adapter.js.map +1 -0
- package/lib/module/internals/version.js +5 -0
- package/lib/module/internals/version.js.map +1 -0
- package/lib/module/notifyAppReady.js +79 -0
- package/lib/module/notifyAppReady.js.map +1 -0
- package/lib/module/reactNative.d.js +2 -0
- package/lib/module/reactNative.d.js.map +1 -0
- package/lib/module/restartApp.js +13 -0
- package/lib/module/restartApp.js.map +1 -0
- package/lib/module/sync.js +215 -0
- package/lib/module/sync.js.map +1 -0
- package/lib/module/types.js +4 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/CodePush.d.ts +24 -0
- package/lib/typescript/commonjs/src/CodePush.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/allowRestart.d.ts +5 -0
- package/lib/typescript/commonjs/src/allowRestart.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/checkForUpdates.d.ts +9 -0
- package/lib/typescript/commonjs/src/checkForUpdates.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/clearUpdates.d.ts +8 -0
- package/lib/typescript/commonjs/src/clearUpdates.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/disallowRestart.d.ts +5 -0
- package/lib/typescript/commonjs/src/disallowRestart.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/CheckFrequency.enum.d.ts +18 -0
- package/lib/typescript/commonjs/src/enums/CheckFrequency.enum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/DeploymentStatus.enum.d.ts +14 -0
- package/lib/typescript/commonjs/src/enums/DeploymentStatus.enum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/InstallMode.enum.d.ts +27 -0
- package/lib/typescript/commonjs/src/enums/InstallMode.enum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/SyncStatus.enum.d.ts +46 -0
- package/lib/typescript/commonjs/src/enums/SyncStatus.enum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/UpdateState.enum.d.ts +21 -0
- package/lib/typescript/commonjs/src/enums/UpdateState.enum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/getUpdateMetadata.d.ts +9 -0
- package/lib/typescript/commonjs/src/getUpdateMetadata.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +17 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/AcquisitionSdk.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/AcquisitionSdk.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/LocalPackageImplementation.d.ts +17 -0
- package/lib/typescript/commonjs/src/internals/LocalPackageImplementation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/NativeRNAppZungCodePushModule.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/NativeRNAppZungCodePushModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts +36 -0
- package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts +18 -0
- package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/getConfiguration.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/getConfiguration.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/getCurrentPackage.d.ts +2 -0
- package/lib/typescript/commonjs/src/internals/getCurrentPackage.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/getPromisifiedSdk.d.ts +13 -0
- package/lib/typescript/commonjs/src/internals/getPromisifiedSdk.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/shouldUpdateBeIgnored.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/shouldUpdateBeIgnored.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/types.d.ts +16 -0
- package/lib/typescript/commonjs/src/internals/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/utils/log.d.ts +2 -0
- package/lib/typescript/commonjs/src/internals/utils/log.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/utils/request-fetch-adapter.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/utils/request-fetch-adapter.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/version.d.ts +2 -0
- package/lib/typescript/commonjs/src/internals/version.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/notifyAppReady.d.ts +6 -0
- package/lib/typescript/commonjs/src/notifyAppReady.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/restartApp.d.ts +7 -0
- package/lib/typescript/commonjs/src/restartApp.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/sync.d.ts +17 -0
- package/lib/typescript/commonjs/src/sync.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types.d.ts +196 -0
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/CodePush.d.ts +24 -0
- package/lib/typescript/module/src/CodePush.d.ts.map +1 -0
- package/lib/typescript/module/src/allowRestart.d.ts +5 -0
- package/lib/typescript/module/src/allowRestart.d.ts.map +1 -0
- package/lib/typescript/module/src/checkForUpdates.d.ts +9 -0
- package/lib/typescript/module/src/checkForUpdates.d.ts.map +1 -0
- package/lib/typescript/module/src/clearUpdates.d.ts +8 -0
- package/lib/typescript/module/src/clearUpdates.d.ts.map +1 -0
- package/lib/typescript/module/src/disallowRestart.d.ts +5 -0
- package/lib/typescript/module/src/disallowRestart.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/CheckFrequency.enum.d.ts +18 -0
- package/lib/typescript/module/src/enums/CheckFrequency.enum.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/DeploymentStatus.enum.d.ts +14 -0
- package/lib/typescript/module/src/enums/DeploymentStatus.enum.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/InstallMode.enum.d.ts +27 -0
- package/lib/typescript/module/src/enums/InstallMode.enum.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/SyncStatus.enum.d.ts +46 -0
- package/lib/typescript/module/src/enums/SyncStatus.enum.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/UpdateState.enum.d.ts +21 -0
- package/lib/typescript/module/src/enums/UpdateState.enum.d.ts.map +1 -0
- package/lib/typescript/module/src/getUpdateMetadata.d.ts +9 -0
- package/lib/typescript/module/src/getUpdateMetadata.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +17 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/AcquisitionSdk.d.ts +3 -0
- package/lib/typescript/module/src/internals/AcquisitionSdk.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/LocalPackageImplementation.d.ts +17 -0
- package/lib/typescript/module/src/internals/LocalPackageImplementation.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/NativeRNAppZungCodePushModule.d.ts +3 -0
- package/lib/typescript/module/src/internals/NativeRNAppZungCodePushModule.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts +36 -0
- package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts +18 -0
- package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/getConfiguration.d.ts +3 -0
- package/lib/typescript/module/src/internals/getConfiguration.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/getCurrentPackage.d.ts +2 -0
- package/lib/typescript/module/src/internals/getCurrentPackage.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/getPromisifiedSdk.d.ts +13 -0
- package/lib/typescript/module/src/internals/getPromisifiedSdk.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/shouldUpdateBeIgnored.d.ts +3 -0
- package/lib/typescript/module/src/internals/shouldUpdateBeIgnored.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/types.d.ts +16 -0
- package/lib/typescript/module/src/internals/types.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/utils/log.d.ts +2 -0
- package/lib/typescript/module/src/internals/utils/log.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/utils/request-fetch-adapter.d.ts +3 -0
- package/lib/typescript/module/src/internals/utils/request-fetch-adapter.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/version.d.ts +2 -0
- package/lib/typescript/module/src/internals/version.d.ts.map +1 -0
- package/lib/typescript/module/src/notifyAppReady.d.ts +6 -0
- package/lib/typescript/module/src/notifyAppReady.d.ts.map +1 -0
- package/lib/typescript/module/src/restartApp.d.ts +7 -0
- package/lib/typescript/module/src/restartApp.d.ts.map +1 -0
- package/lib/typescript/module/src/sync.d.ts +17 -0
- package/lib/typescript/module/src/sync.d.ts.map +1 -0
- package/lib/typescript/module/src/types.d.ts +196 -0
- package/lib/typescript/module/src/types.d.ts.map +1 -0
- package/package.json +58 -11
- package/react-native.config.js +8 -8
- package/src/CodePush.tsx +108 -0
- package/src/allowRestart.ts +6 -0
- package/src/checkForUpdates.ts +109 -0
- package/src/clearUpdates.ts +9 -0
- package/src/disallowRestart.ts +6 -0
- package/src/enums/CheckFrequency.enum.ts +19 -0
- package/src/enums/DeploymentStatus.enum.ts +14 -0
- package/src/enums/InstallMode.enum.ts +31 -0
- package/src/enums/SyncStatus.enum.ts +53 -0
- package/src/enums/UpdateState.enum.ts +24 -0
- package/src/getUpdateMetadata.ts +23 -0
- package/src/index.ts +18 -0
- package/src/internals/AcquisitionSdk.ts +3 -0
- package/src/internals/LocalPackageImplementation.ts +45 -0
- package/src/internals/NativeRNAppZungCodePushModule.ts +3 -0
- package/src/internals/RNAppZungCodePushModuleSpec.ts +54 -0
- package/src/internals/RemotePackageImplementation.ts +69 -0
- package/src/internals/getConfiguration.ts +12 -0
- package/src/internals/getCurrentPackage.ts +6 -0
- package/src/internals/getPromisifiedSdk.ts +72 -0
- package/src/internals/shouldUpdateBeIgnored.ts +76 -0
- package/src/internals/types.ts +18 -0
- package/{logging.js → src/internals/utils/log.ts} +1 -3
- package/src/internals/utils/request-fetch-adapter.ts +58 -0
- package/src/internals/version.ts +2 -0
- package/src/notifyAppReady.ts +94 -0
- package/src/reactNative.d.ts +34 -0
- package/src/restartApp.ts +10 -0
- package/src/sync.ts +272 -0
- package/src/types.ts +237 -0
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +29 -12
- package/AlertAdapter.js +0 -24
- package/CONTRIBUTING.md +0 -134
- package/CodePush.js +0 -674
- package/android/app/.gradle/config.properties +0 -2
- package/android/app/local.properties +0 -8
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushBuilder.java +0 -37
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushDialog.java +0 -102
- package/package-mixins.js +0 -68
- package/request-fetch-adapter.js +0 -52
- package/tslint.json +0 -32
- package/typings/react-native-code-push.d.ts +0 -455
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushConstants.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInstallMode.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInvalidPublicKeyException.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInvalidUpdateException.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushMalformedDataException.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushNotInitializedException.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushTelemetryManager.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUnknownException.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateState.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateUtils.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUtils.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/DownloadProgress.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/DownloadProgressCallback.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/FileUtils.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/ReactInstanceHolder.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/SettingsManager.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/TLSSocketFactory.java +0 -0
package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushNativeModule.java
RENAMED
|
@@ -5,7 +5,6 @@ import android.content.SharedPreferences;
|
|
|
5
5
|
import android.os.AsyncTask;
|
|
6
6
|
import android.os.Handler;
|
|
7
7
|
import android.os.Looper;
|
|
8
|
-
import android.provider.Settings;
|
|
9
8
|
import android.view.View;
|
|
10
9
|
|
|
11
10
|
import com.facebook.react.ReactApplication;
|
|
@@ -20,9 +19,11 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
|
20
19
|
import com.facebook.react.bridge.ReactMethod;
|
|
21
20
|
import com.facebook.react.bridge.ReadableMap;
|
|
22
21
|
import com.facebook.react.bridge.WritableMap;
|
|
22
|
+
import com.facebook.react.devsupport.interfaces.DevSupportManager;
|
|
23
23
|
import com.facebook.react.modules.core.ChoreographerCompat;
|
|
24
24
|
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
|
25
25
|
import com.facebook.react.modules.core.ReactChoreographer;
|
|
26
|
+
import com.facebook.react.modules.debug.interfaces.DeveloperSettings;
|
|
26
27
|
|
|
27
28
|
import org.json.JSONArray;
|
|
28
29
|
import org.json.JSONException;
|
|
@@ -30,6 +31,7 @@ import org.json.JSONObject;
|
|
|
30
31
|
|
|
31
32
|
import java.io.IOException;
|
|
32
33
|
import java.lang.reflect.Field;
|
|
34
|
+
import java.lang.reflect.Method;
|
|
33
35
|
import java.util.ArrayList;
|
|
34
36
|
import java.util.Date;
|
|
35
37
|
import java.util.HashMap;
|
|
@@ -132,10 +134,17 @@ public class CodePushNativeModule extends ReactContextBaseJavaModule {
|
|
|
132
134
|
private void loadBundle() {
|
|
133
135
|
clearLifecycleEventListener();
|
|
134
136
|
try {
|
|
135
|
-
|
|
137
|
+
DevSupportManager devSupportManager = null;
|
|
138
|
+
ReactInstanceManager reactInstanceManager = resolveInstanceManager();
|
|
139
|
+
if (reactInstanceManager != null) {
|
|
140
|
+
devSupportManager = reactInstanceManager.getDevSupportManager();
|
|
141
|
+
}
|
|
142
|
+
boolean isLiveReloadEnabled = isLiveReloadEnabled(devSupportManager);
|
|
143
|
+
|
|
144
|
+
mCodePush.clearDebugCacheIfNeeded(isLiveReloadEnabled);
|
|
136
145
|
} catch(Exception e) {
|
|
137
146
|
// If we got error in out reflection we should clear debug cache anyway.
|
|
138
|
-
mCodePush.clearDebugCacheIfNeeded(
|
|
147
|
+
mCodePush.clearDebugCacheIfNeeded(false);
|
|
139
148
|
}
|
|
140
149
|
|
|
141
150
|
try {
|
|
@@ -179,6 +188,26 @@ public class CodePushNativeModule extends ReactContextBaseJavaModule {
|
|
|
179
188
|
}
|
|
180
189
|
}
|
|
181
190
|
|
|
191
|
+
private boolean isLiveReloadEnabled(DevSupportManager devSupportManager) {
|
|
192
|
+
if (devSupportManager == null) {
|
|
193
|
+
return false;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
DeveloperSettings devSettings = devSupportManager.getDevSettings();
|
|
197
|
+
Method[] methods = devSettings.getClass().getMethods();
|
|
198
|
+
for (Method m : methods) {
|
|
199
|
+
if (m.getName().equals("isReloadOnJSChangeEnabled")) {
|
|
200
|
+
try {
|
|
201
|
+
return (boolean) m.invoke(devSettings);
|
|
202
|
+
} catch (Exception x) {
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
|
|
182
211
|
// This workaround has been implemented in order to fix https://github.com/facebook/react-native/issues/14533
|
|
183
212
|
// resetReactRootViews allows to call recreateReactContextInBackground without any exceptions
|
|
184
213
|
// This fix also relates to https://github.com/microsoft/react-native-code-push/issues/878
|
|
@@ -278,8 +278,8 @@ public class CodePushUpdateManager {
|
|
|
278
278
|
throw new CodePushInvalidUpdateException(
|
|
279
279
|
"Error! Public key was provided but there is no JWT signature within app bundle to verify. " +
|
|
280
280
|
"Possible reasons, why that might happen: \n" +
|
|
281
|
-
"1. You
|
|
282
|
-
"2. You
|
|
281
|
+
"1. You released a CodePush bundle update using version of CodePush CLI that does not support code signing.\n" +
|
|
282
|
+
"2. You released a CodePush bundle update without providing --privateKeyPath option."
|
|
283
283
|
);
|
|
284
284
|
}
|
|
285
285
|
} else {
|
package/android/build.gradle
CHANGED
|
@@ -6,19 +6,9 @@ buildscript {
|
|
|
6
6
|
mavenCentral()
|
|
7
7
|
}
|
|
8
8
|
dependencies {
|
|
9
|
-
classpath
|
|
9
|
+
classpath "com.android.tools.build:gradle:7.2.1"
|
|
10
10
|
|
|
11
11
|
// NOTE: Do not place your application dependencies here; they belong
|
|
12
12
|
// in the individual module build.gradle files
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
allprojects {
|
|
17
|
-
android {
|
|
18
|
-
namespace "com.appzung.codepush.react"
|
|
19
|
-
}
|
|
20
|
-
repositories {
|
|
21
|
-
mavenLocal()
|
|
22
|
-
mavenCentral()
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
|
|
3
4
|
zipStoreBase=GRADLE_USER_HOME
|
|
4
5
|
zipStorePath=wrapper/dists
|
|
5
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
|
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
#
|
|
5
|
-
# any settings specified in this file.
|
|
6
|
-
|
|
7
|
-
# For more details on how to configure your build environment visit
|
|
8
|
-
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
|
9
|
-
|
|
10
|
-
# Specifies the JVM arguments used for the daemon process.
|
|
11
|
-
# The setting is particularly useful for tweaking memory settings.
|
|
12
|
-
# Default value: -Xmx10248m -XX:MaxPermSize=256m
|
|
13
|
-
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
|
14
|
-
|
|
15
|
-
# When configured, Gradle will run in incubating parallel mode.
|
|
16
|
-
# This option should only be used with decoupled projects. More details, visit
|
|
17
|
-
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
|
18
|
-
# org.gradle.parallel=true
|
|
19
|
-
|
|
20
|
-
android.useDeprecatedNdk=true
|
|
1
|
+
CodePush_minSdkVersion=16
|
|
2
|
+
CodePush_targetSdkVersion=31
|
|
3
|
+
CodePush_compileSdkVersion=31
|
|
4
|
+
# CodePush_development=true # enable this when developing on the module outside a React Native app
|
package/docs/advanced-usage.md
CHANGED
|
@@ -32,7 +32,7 @@ In the case where you have a `QA` environment that is completely iso-prod (meani
|
|
|
32
32
|
2. Let QA test the build
|
|
33
33
|
3. Promote the tested release from `QA` to `Production` using the `appzung releases promote` command
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
_NOTE: If you want to take a more cautious approach, you can even choose to perform a "staged rollout" as part of #3, which allows you to mitigate additional potential risk with the update (like did your testing in #2 touch all possible devices/conditions?) by only making the production update available to a percentage of your users (for example `appzung releases promote -r 20`). Then, after waiting for a reasonable amount of time to see if any crash reports or customer feedback comes in, you can expand it to your entire audience by running `appzung releases edit -r 100`._
|
|
36
36
|
|
|
37
37
|
### Dynamic release channel assignment
|
|
38
38
|
|
|
@@ -51,6 +51,6 @@ With that change in place, now it's just a matter of choosing how your app deter
|
|
|
51
51
|
1. Expose a user-visible mechanism for changing release channels at any time. For example, your settings page could have a toggle for enabling "beta" access. This model works well if you're not concerned with the privacy of your pre-production updates, and you have power users that may want to opt-in to earlier (and potentially buggy) updates at their own will (kind of like Chrome channels). However, this solution puts the decision in the hands of your users, which doesn't help you perform A/B tests transparently.
|
|
52
52
|
2. Annotate the server-side profile of your users with an additional piece of metadata that indicates the release channel they should sync with. By default, your app could just use the binary-embedded key, but after a user has authenticated, your server can choose to "redirect" them to a different release channel, which allows you to incrementally place certain users or groups in different release channels as needed. You could even choose to store the server-response in local storage so that it becomes the new default. How you store the key alongside your user's profiles is entirely up to your authentication solution (for example Auth0, Firebase, custom DB + REST API), but is generally pretty trivial to do.
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
_NOTE: If needed, you could also implement a hybrid solution that allowed your end-users to toggle between different release channels, while also allowing your server to override that decision. This way, you have a hierarchy of "release channel resolution" that ensures your app has the ability to update itself out-of-the-box, your end users can feel rewarded by getting early access to bits, but you also have the ability to run A/B tests on your users as needed._
|
|
55
55
|
|
|
56
56
|
Are you using dynamic release channel assignments? Contact us at hello@appzung.com so that we may provide better integration.
|
package/docs/api-android.md
CHANGED
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
You can customize CodePush by placing these values in string resources.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
```xml
|
|
7
|
-
<string moduleConfig="true" name="CodePushReleaseChannelPublicId">sU0Eikse9JFCDLZmAT-_lUSwDWACrSGgTKCXyWqcE0</string>
|
|
8
|
-
```
|
|
5
|
+
- **Release channel Public ID** - The default release channel's **public ID** that will be used to check updates. For example:
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
```xml
|
|
8
|
+
<string moduleConfig="true" name="CodePushReleaseChannelPublicId">sU0Eikse9JFCDLZmAT-_lUSwDWACrSGgTKCXyWqcE0</string>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
- **Public Key** - used for bundle verification in the Code Signing Feature. Please refer to [Code Signing](setup-android.md#code-signing-setup) section for more details about the Code Signing Feature.
|
|
11
12
|
To set the public key, you should add the content of the public key to `strings.xml` with name `CodePushSigningPublicKey`. CodePush automatically gets this property and enables the Code Signing feature. For example:
|
|
13
|
+
|
|
12
14
|
```xml
|
|
13
15
|
<string moduleConfig="true" name="CodePushSigningPublicKey">your-public-key</string>
|
|
14
16
|
```
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
- **Server Url** - used for specifying CodePush Server Url (as an Enterprise customer we may setup a custom infra for your needs).
|
|
19
|
+
The Default value: "https://codepush.appzung.com/" is overridden by adding your path to `strings.xml` with name `CodePushServerUrl`. CodePush automatically gets this property and will use this path to send requests. For example:
|
|
20
|
+
```xml
|
|
21
|
+
<string moduleConfig="true" name="CodePushServerUrl">https://codepush.yourdomain.com</string>
|
|
22
|
+
```
|
package/docs/api-ios.md
CHANGED
|
@@ -8,12 +8,12 @@ Contains static methods for retrieving the `NSURL` that represents the most rece
|
|
|
8
8
|
|
|
9
9
|
#### Methods
|
|
10
10
|
|
|
11
|
-
-
|
|
11
|
+
- **(NSURL \*)bundleURL** - Returns the most recent JS bundle `NSURL` as described above. This method assumes that the name of the JS bundle contained within your app binary is `main.jsbundle`.
|
|
12
12
|
|
|
13
|
-
-
|
|
13
|
+
- **(NSURL \*)bundleURLForResource:(NSString \*)resourceName** - Equivalent to the `bundleURL` method, but also allows customizing the name of the JS bundle that is looked for within the app binary. This is useful if you aren't naming this file `main` (which is the default convention). This method assumes that the JS bundle's extension is `*.jsbundle`.
|
|
14
14
|
|
|
15
|
-
-
|
|
15
|
+
- **(NSURL \*)bundleURLForResource:(NSString \*)resourceName withExtension:(NSString \*)resourceExtension**: Equivalent to the `bundleURLForResource:` method, but also allows customizing the extension used by the JS bundle that is looked for within the app binary. This is useful if you aren't naming this file `*.jsbundle` (which is the default convention).
|
|
16
16
|
|
|
17
|
-
-
|
|
17
|
+
- **(void)overrideAppVersion:(NSString \*)appVersionOverride** - Sets the version of the application's binary interface, which would otherwise default to the App Store version specified as the `CFBundleShortVersionString` in the `Info.plist`. This should be called a single time, before the bundle URL is loaded.
|
|
18
18
|
|
|
19
|
-
-
|
|
19
|
+
- **(void)setReleaseChannelPublicId:(NSString \*)releaseChannelPublicId** - Sets the release channel public ID that the app should use when querying for updates. This is a dynamic alternative to setting the release channel in your `Info.plist` and/or specifying a release channel in JS when calling `checkForUpdate` or `sync`.
|