@appzung/react-native-code-push 8.3.2 → 10.0.0-rc1
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.js +22 -19
- package/CodePush.podspec +3 -3
- package/LICENSE.md +1 -1
- package/README.md +159 -296
- package/android/app/.gradle/config.properties +2 -0
- package/android/app/build.gradle +2 -0
- package/android/app/local.properties +8 -0
- package/android/app/src/main/AndroidManifest.xml +1 -2
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java +27 -21
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushBuilder.java +5 -5
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushConstants.java +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushDialog.java +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushInstallMode.java +2 -2
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushInvalidPublicKeyException.java +2 -2
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushInvalidUpdateException.java +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushMalformedDataException.java +2 -2
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java +5 -5
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushNotInitializedException.java +2 -2
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushTelemetryManager.java +14 -14
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUnknownException.java +2 -2
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateManager.java +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateState.java +2 -2
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateUtils.java +16 -9
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUtils.java +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/DownloadProgress.java +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/DownloadProgressCallback.java +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/FileUtils.java +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/ReactInstanceHolder.java +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/SettingsManager.java +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/TLSSocketFactory.java +1 -1
- package/android/build.gradle +3 -0
- package/android/codepush.gradle +3 -3
- package/docs/advanced-usage.md +56 -0
- package/docs/api-android.md +12 -75
- package/docs/api-ios.md +5 -17
- package/docs/api-js.md +18 -55
- package/docs/setup-android.md +15 -397
- package/docs/setup-ios.md +24 -198
- package/docs/setup-windows.md +7 -74
- package/ios/CodePush/CodePush.h +4 -4
- package/ios/CodePush/CodePush.m +10 -9
- package/ios/CodePush/CodePushConfig.m +14 -11
- package/ios/CodePush/CodePushPackage.m +60 -60
- package/ios/CodePush/CodePushTelemetryManager.m +13 -13
- package/ios/CodePush.xcodeproj/project.pbxproj +24 -470
- package/ios/PrivacyInfo.xcprivacy +31 -0
- package/package.json +27 -24
- package/react-native.config.js +1 -1
- package/scripts/generateBundledResourcesHash.js +1 -1
- package/scripts/getFilesInFolder.js +1 -1
- package/scripts/recordFilesBeforeBundleCommand.js +1 -1
- package/typings/react-native-code-push.d.ts +22 -22
- package/windows/CodePush/CodePushConfig.cpp +3 -3
- package/windows/CodePush/CodePushConfig.h +3 -3
- package/windows/CodePush/CodePushNativeModule.cpp +27 -27
- package/windows/CodePush/CodePushNativeModule.h +4 -4
- package/windows/CodePush/CodePushTelemetryManager.cpp +12 -12
- package/windows/CodePush/CodePushTelemetryManager.h +1 -1
- package/.azurepipelines/build-rn-code-push-1es.yml +0 -104
- package/.azurepipelines/test-rn-code-push.yml +0 -94
- package/.config/CredScanSuppressions.json +0 -14
- package/SECURITY.md +0 -41
- package/docs/multi-deployment-testing-android.md +0 -148
- package/docs/multi-deployment-testing-ios.md +0 -59
- package/ios/CodePush/Base64/Base64/MF_Base64Additions.h +0 -34
- package/ios/CodePush/Base64/Base64/MF_Base64Additions.m +0 -252
- package/ios/CodePush/Base64/README.md +0 -47
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithm.h +0 -69
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.h +0 -16
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.m +0 -51
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.h +0 -15
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.m +0 -55
- package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.h +0 -24
- package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.m +0 -41
- package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.h +0 -28
- package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.m +0 -205
- package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.h +0 -103
- package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.m +0 -322
- package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.h +0 -37
- package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.m +0 -145
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.h +0 -35
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.m +0 -551
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTRSAlgorithm.h +0 -23
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.h +0 -43
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.m +0 -230
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.h +0 -31
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.m +0 -113
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.h +0 -38
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.m +0 -500
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.h +0 -18
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.m +0 -214
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.h +0 -23
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.m +0 -29
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.h +0 -19
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.m +0 -68
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.h +0 -18
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.m +0 -72
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.h +0 -67
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.m +0 -111
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.h +0 -119
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.m +0 -307
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.h +0 -94
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.m +0 -619
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.h +0 -164
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.m +0 -514
- package/ios/CodePush/JWT/Core/Coding/JWTCoding.h +0 -24
- package/ios/CodePush/JWT/Core/Coding/JWTCoding.m +0 -11
- package/ios/CodePush/JWT/Core/FrameworkSupplement/JWT.h +0 -52
- package/ios/CodePush/JWT/Core/FrameworkSupplement/Map.modulemap +0 -5
- package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.h +0 -28
- package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.m +0 -70
- package/ios/CodePush/JWT/Core/Supplement/JWTDeprecations.h +0 -22
- package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.h +0 -34
- package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.m +0 -73
- package/ios/CodePush/JWT/LICENSE +0 -19
- package/ios/CodePush/JWT/README.md +0 -489
- package/ios/CodePush/SSZipArchive/Common.h +0 -81
- package/ios/CodePush/SSZipArchive/README.md +0 -1
- package/ios/CodePush/SSZipArchive/SSZipArchive.h +0 -76
- package/ios/CodePush/SSZipArchive/SSZipArchive.m +0 -691
- package/ios/CodePush/SSZipArchive/aes/aes.h +0 -198
- package/ios/CodePush/SSZipArchive/aes/aes_via_ace.h +0 -541
- package/ios/CodePush/SSZipArchive/aes/aescrypt.c +0 -294
- package/ios/CodePush/SSZipArchive/aes/aeskey.c +0 -548
- package/ios/CodePush/SSZipArchive/aes/aesopt.h +0 -739
- package/ios/CodePush/SSZipArchive/aes/aestab.c +0 -391
- package/ios/CodePush/SSZipArchive/aes/aestab.h +0 -173
- package/ios/CodePush/SSZipArchive/aes/brg_endian.h +0 -126
- package/ios/CodePush/SSZipArchive/aes/brg_types.h +0 -219
- package/ios/CodePush/SSZipArchive/aes/entropy.c +0 -54
- package/ios/CodePush/SSZipArchive/aes/entropy.h +0 -16
- package/ios/CodePush/SSZipArchive/aes/fileenc.c +0 -144
- package/ios/CodePush/SSZipArchive/aes/fileenc.h +0 -121
- package/ios/CodePush/SSZipArchive/aes/hmac.c +0 -145
- package/ios/CodePush/SSZipArchive/aes/hmac.h +0 -103
- package/ios/CodePush/SSZipArchive/aes/prng.c +0 -155
- package/ios/CodePush/SSZipArchive/aes/prng.h +0 -82
- package/ios/CodePush/SSZipArchive/aes/pwd2key.c +0 -103
- package/ios/CodePush/SSZipArchive/aes/pwd2key.h +0 -57
- package/ios/CodePush/SSZipArchive/aes/sha1.c +0 -258
- package/ios/CodePush/SSZipArchive/aes/sha1.h +0 -73
- package/ios/CodePush/SSZipArchive/minizip/crypt.h +0 -130
- package/ios/CodePush/SSZipArchive/minizip/ioapi.c +0 -369
- package/ios/CodePush/SSZipArchive/minizip/ioapi.h +0 -175
- package/ios/CodePush/SSZipArchive/minizip/mztools.c +0 -284
- package/ios/CodePush/SSZipArchive/minizip/mztools.h +0 -31
- package/ios/CodePush/SSZipArchive/minizip/unzip.c +0 -1839
- package/ios/CodePush/SSZipArchive/minizip/unzip.h +0 -248
- package/ios/CodePush/SSZipArchive/minizip/zip.c +0 -1910
- package/ios/CodePush/SSZipArchive/minizip/zip.h +0 -202
- package/scripts/postlink/android/postlink.js +0 -87
- package/scripts/postlink/ios/postlink.js +0 -116
- package/scripts/postlink/run.js +0 -11
- package/scripts/postunlink/android/postunlink.js +0 -74
- package/scripts/postunlink/ios/postunlink.js +0 -87
- package/scripts/postunlink/run.js +0 -11
- package/scripts/tools/linkToolsAndroid.js +0 -57
- package/scripts/tools/linkToolsIos.js +0 -130
- package/windows-legacy/CodePush/CodePush.csproj +0 -128
- package/windows-legacy/CodePush/CodePushUtils.cs +0 -47
- package/windows-legacy/CodePush/FileUtils.cs +0 -40
- package/windows-legacy/CodePush/Properties/AssemblyInfo.cs +0 -29
- package/windows-legacy/CodePush/Properties/CodePush.rd.xml +0 -33
- package/windows-legacy/CodePush/UpdateManager.cs +0 -305
- package/windows-legacy/CodePush/UpdateUtils.cs +0 -46
- package/windows-legacy/CodePush.Net46/Adapters/Http/HttpProgress.cs +0 -28
- package/windows-legacy/CodePush.Net46/Adapters/Storage/ApplicationDataContainer.cs +0 -106
- package/windows-legacy/CodePush.Net46/CodePush.Net46.csproj +0 -103
- package/windows-legacy/CodePush.Net46/CodePushUtils.cs +0 -158
- package/windows-legacy/CodePush.Net46/FileUtils.cs +0 -55
- package/windows-legacy/CodePush.Net46/Properties/AssemblyInfo.cs +0 -36
- package/windows-legacy/CodePush.Net46/UpdateManager.cs +0 -330
- package/windows-legacy/CodePush.Net46/UpdateUtils.cs +0 -70
- package/windows-legacy/CodePush.Net46/packages.config +0 -5
- package/windows-legacy/CodePush.Net46.Test/ApplicationDataContainerTest.cs +0 -105
- package/windows-legacy/CodePush.Net46.Test/CodePush.Net46.Test.csproj +0 -137
- package/windows-legacy/CodePush.Net46.Test/Properties/AssemblyInfo.cs +0 -36
- package/windows-legacy/CodePush.Net46.Test/TelemetryManagerTest.cs +0 -117
- package/windows-legacy/CodePush.Net46.Test/app.config +0 -11
- package/windows-legacy/CodePush.Net46.Test/packages.config +0 -4
- package/windows-legacy/CodePush.Shared/CodePush.Shared.projitems +0 -22
- package/windows-legacy/CodePush.Shared/CodePush.Shared.shproj +0 -13
- package/windows-legacy/CodePush.Shared/CodePushConstants.cs +0 -35
- package/windows-legacy/CodePush.Shared/CodePushNativeModule.cs +0 -329
- package/windows-legacy/CodePush.Shared/CodePushReactPackage.cs +0 -235
- package/windows-legacy/CodePush.Shared/CodePushUtils.cs +0 -70
- package/windows-legacy/CodePush.Shared/InstallMode.cs +0 -9
- package/windows-legacy/CodePush.Shared/MinimumBackgroundListener.cs +0 -44
- package/windows-legacy/CodePush.Shared/SettingsManager.cs +0 -148
- package/windows-legacy/CodePush.Shared/TelemetryManager.cs +0 -250
- package/windows-legacy/CodePush.Shared/UpdateState.cs +0 -9
package/README.md
CHANGED
|
@@ -1,224 +1,173 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
#### [Sign up With App Center](https://appcenter.ms/signup?utm_source=CodePush&utm_medium=Azure) to use CodePush
|
|
4
|
-
|
|
5
|
-
# React Native Module for CodePush
|
|
6
|
-
|
|
7
|
-
*Note: This README is only relevant to the latest version of our plugin. If you are using an older version, please switch to the relevant tag on [our GitHub repo](https://github.com/microsoft/react-native-code-push) to view the docs for that particular version.*
|
|
8
|
-
|
|
9
|
-

|
|
10
|
-
|
|
11
|
-
This plugin provides client-side integration for the [CodePush service](https://microsoft.github.io/code-push/), allowing you to easily add a dynamic update experience to your React Native app(s).
|
|
12
|
-
|
|
13
|
-
<!-- React Native Catalog -->
|
|
1
|
+
# React Native Module for AppZung CodePush
|
|
14
2
|
|
|
3
|
+
* [AppZung](#appzung)
|
|
15
4
|
* [How does it work?](#how-does-it-work)
|
|
16
|
-
* [
|
|
17
|
-
* [
|
|
18
|
-
* [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
* [
|
|
23
|
-
|
|
24
|
-
* [Releasing
|
|
25
|
-
* [
|
|
26
|
-
* [Android](docs/multi-deployment-testing-android.md)
|
|
27
|
-
* [iOS](docs/multi-deployment-testing-ios.md)
|
|
28
|
-
* [Dynamic Deployment Assignment](#dynamic-deployment-assignment)
|
|
5
|
+
* [Getting started](#getting-started)
|
|
6
|
+
* [iOS Setup](docs/setup-ios.md)
|
|
7
|
+
* [Android Setup](docs/setup-android.md)
|
|
8
|
+
* [Windows Setup](docs/setup-windows.md)
|
|
9
|
+
* [Migrating to AppZung CodePush](#migrating-to-appzung-codepush)
|
|
10
|
+
* [Compatibility table](#compatibility-table)
|
|
11
|
+
* [Usage](#usage)
|
|
12
|
+
* [Advanced usage](./docs/advanced-usage.md)
|
|
13
|
+
* [Releasing updates](#releasing-updates)
|
|
14
|
+
* [Store guidelines compliance](#store-guidelines-compliance)
|
|
29
15
|
* [API Reference](#api-reference)
|
|
30
|
-
* [JavaScript API](docs/api-js.md)
|
|
31
|
-
* [Objective-C API Reference (iOS)](docs/api-ios.md)
|
|
32
|
-
* [Java API Reference (Android)](docs/api-android.md)
|
|
33
16
|
* [Debugging / Troubleshooting](#debugging--troubleshooting)
|
|
34
|
-
* [Example Apps / Starters](#example-apps--starters)
|
|
35
|
-
* [Continuous Integration / Delivery](#continuous-integration--delivery)
|
|
36
|
-
* [TypeScript Consumption](#typescript-consumption)
|
|
37
|
-
|
|
38
|
-
<!-- React Native Catalog -->
|
|
39
|
-
|
|
40
|
-
## How does it work?
|
|
41
|
-
|
|
42
|
-
A React Native app is composed of JavaScript files and any accompanying [images](https://reactnative.dev/docs/image), which are bundled together by the [metro bundler](https://github.com/facebook/metro) and distributed as part of a platform-specific binary (i.e. an `.ipa` or `.apk` file). Once the app is released, updating either the JavaScript code (e.g. making bug fixes, adding new features) or image assets, requires you to recompile and redistribute the entire binary, which of course, includes any review time associated with the store(s) you are publishing to.
|
|
43
|
-
|
|
44
|
-
The CodePush plugin helps get product improvements in front of your end users instantly, by keeping your JavaScript and images synchronized with updates you release to the CodePush server. This way, your app gets the benefits of an offline mobile experience, as well as the "web-like" agility of side-loading updates as soon as they are available. It's a win-win!
|
|
45
17
|
|
|
46
|
-
|
|
18
|
+
## AppZung
|
|
47
19
|
|
|
48
|
-
|
|
20
|
+
AppZung is a robust solution for CodePush functionality, created in response to AppCenter's retirement.
|
|
21
|
+
CodePush allows you to easily add a dynamic update experience to your React Native app(s).
|
|
49
22
|
|
|
50
|
-
|
|
23
|
+
We will offer feature-parity with the original CodePush and introduce advanced capabilities in:
|
|
51
24
|
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
25
|
+
- Hosting
|
|
26
|
+
- Delivery
|
|
27
|
+
- Analytics
|
|
28
|
+
- Security
|
|
29
|
+
- Privacy
|
|
55
30
|
|
|
56
|
-
|
|
31
|
+
Currently, AppZung is used in production by several private clients, serving over 2M end-users.
|
|
57
32
|
|
|
58
|
-
|
|
59
|
-
|-------------------------|-------------------------------------------------------|
|
|
60
|
-
| <0.14 | **Unsupported** |
|
|
61
|
-
| v0.14 | v1.3 *(introduced Android support)* |
|
|
62
|
-
| v0.15-v0.18 | v1.4-v1.6 *(introduced iOS asset support)* |
|
|
63
|
-
| v0.19-v0.28 | v1.7-v1.17 *(introduced Android asset support)* |
|
|
64
|
-
| v0.29-v0.30 | v1.13-v1.17 *(RN refactored native hosting code)* |
|
|
65
|
-
| v0.31-v0.33 | v1.14.6-v1.17 *(RN refactored native hosting code)* |
|
|
66
|
-
| v0.34-v0.35 | v1.15-v1.17 *(RN refactored native hosting code)* |
|
|
67
|
-
| v0.36-v0.39 | v1.16-v1.17 *(RN refactored resume handler)* |
|
|
68
|
-
| v0.40-v0.42 | v1.17 *(RN refactored iOS header files)* |
|
|
69
|
-
| v0.43-v0.44 | v2.0+ *(RN refactored uimanager dependencies)* |
|
|
70
|
-
| v0.45 | v3.0+ *(RN refactored instance manager code)* |
|
|
71
|
-
| v0.46 | v4.0+ *(RN refactored js bundle loader code)* |
|
|
72
|
-
| v0.46-v0.53 | v5.1+ *(RN removed unused registration of JS modules)*|
|
|
73
|
-
| v0.54-v0.55 | v5.3+ *(Android Gradle Plugin 3.x integration)* |
|
|
74
|
-
| v0.56-v0.58 | v5.4+ *(RN upgraded versions for Android tools)* |
|
|
75
|
-
| v0.59 | v5.6+ *(RN refactored js bundle loader code)* |
|
|
76
|
-
| v0.60-v0.61 | v6.0+ *(RN migrated to Autolinking)* |
|
|
77
|
-
| v0.62-v0.64 | v6.2+ *(RN removed LiveReload)* |
|
|
78
|
-
| v0.65-v0.70 | v7.0+ *(RN updated iPhone-target-version)* |
|
|
79
|
-
| v0.71 | v8.0+ *(RN moved to react-native-gradle-plugin)* |
|
|
80
|
-
|
|
81
|
-
*NOTE: `react-native-code-push` versions lower than **[v5.7.0](https://github.com/microsoft/react-native-code-push/releases/tag/v5.7.0)** will stop working in the near future. You can find more information in our [documentation](https://github.com/microsoft/code-push/blob/master/migration-notice.md).*
|
|
33
|
+
AppZung may or may not expand the scope beyond CodePush features in the future.
|
|
82
34
|
|
|
83
|
-
|
|
35
|
+
It is not yet available publicly - Email hello@appzung.com to join the platform.
|
|
84
36
|
|
|
85
|
-
|
|
37
|
+
## How does it work?
|
|
86
38
|
|
|
87
|
-
|
|
39
|
+
A React Native app is composed of JavaScript files and any accompanying [images](https://reactnative.dev/docs/image), which are bundled together by the [metro bundler](https://github.com/facebook/metro) and distributed as part of a platform-specific binary (i.e. an `.ipa` or `.apk` file). Once the app is released, updating either the JavaScript code (e.g. making bug fixes, adding new features) or image assets, requires you to recompile and redistribute the entire binary, which of course, includes any review time associated with the store(s) you are publishing to.
|
|
88
40
|
|
|
89
|
-
|
|
90
|
-
|-------------------------------------------------|------------------------------------------|
|
|
91
|
-
| `Image` | `source` |
|
|
92
|
-
| `MapView.Marker` <br />*(Requires [react-native-maps](https://github.com/lelandrichardson/react-native-maps) `>=O.3.2`)* | `image` |
|
|
93
|
-
| `ProgressViewIOS` | `progressImage`, `trackImage` |
|
|
94
|
-
| `TabBarIOS.Item` | `icon`, `selectedIcon` |
|
|
95
|
-
| `ToolbarAndroid` <br />*(React Native 0.21.0+)* | `actions[].icon`, `logo`, `overflowIcon` |
|
|
96
|
-
| `Video` | `source` |
|
|
41
|
+
The CodePush plugin helps get product improvements in front of your end users instantly, by keeping your JavaScript and images synchronized with updates you release to the CodePush server. This way, your app gets the benefits of an offline mobile experience, as well as the "web-like" agility of side-loading updates as soon as they are available. It's a win-win!
|
|
97
42
|
|
|
98
|
-
|
|
43
|
+
In order to ensure that your end users always have a functioning version of your app, the CodePush plugin maintains a copy of the previous update, so that in the event that you accidentally push an update which includes a crash, it can automatically roll back. This way, you can rest assured that your newfound release agility won't result in users becoming blocked before you have a chance to roll back on the server. It's a win-win-win!
|
|
99
44
|
|
|
100
|
-
|
|
101
|
-
|-------------|----------------------------------------------------------------------|
|
|
102
|
-
| `SliderIOS` | `maximumTrackImage`, `minimumTrackImage`, `thumbImage`, `trackImage` |
|
|
103
|
-
| `Video` | `source` |
|
|
45
|
+
*Note: Any product changes which touch native code (e.g. modifying your `AppDelegate.mm`/`MainActivity.kt` file, adding a new plugin, or changing an image or video not using `require()` syntax) cannot be distributed via CodePush, and therefore, must be updated via the appropriate store(s).*
|
|
104
46
|
|
|
105
|
-
|
|
47
|
+
## Getting started
|
|
106
48
|
|
|
107
|
-
|
|
49
|
+
If you are migrating from `react-native-code-push`, see below ["Migrating to AppZung CodePush"](#migrating-to-appzung-codepush).
|
|
108
50
|
|
|
109
|
-
```
|
|
110
|
-
|
|
51
|
+
```shell
|
|
52
|
+
npm install --save @appzung/react-native-code-push
|
|
111
53
|
```
|
|
112
54
|
|
|
113
|
-
|
|
55
|
+
*NOTE: For Expo apps a plugin will be made available soon. In the meantime, you may eject.*
|
|
114
56
|
|
|
115
|
-
|
|
57
|
+
Then continue with installing the native module:
|
|
116
58
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
59
|
+
* [iOS Setup](docs/setup-ios.md)
|
|
60
|
+
* [Android Setup](docs/setup-android.md)
|
|
61
|
+
* [Windows Setup](docs/setup-windows.md)
|
|
120
62
|
|
|
121
|
-
|
|
63
|
+
## Migrating to AppZung CodePush
|
|
122
64
|
|
|
123
|
-
|
|
65
|
+
This `@appzung/react-native-code-push` package aims to be a drop-in replacement for the `react-native-code-push` module from Microsoft. You may find the migration steps below.
|
|
124
66
|
|
|
125
|
-
|
|
67
|
+
This package will be updated with new features, that will only be available on `@appzung/react-native-code-push` v10+ (not the original `react-native-code-push` module).
|
|
126
68
|
|
|
127
|
-
|
|
128
|
-
* [iOS Setup](docs/setup-ios.md)
|
|
129
|
-
* [Android Setup](docs/setup-android.md)
|
|
130
|
-
* [Windows Setup](docs/setup-windows.md)
|
|
69
|
+
This package is compatible with the new architecture on iOS (tested on 0.76) with the interop layer, but not yet on Android. We started some work, but we are not focusing on it right now since there is no demand from our private clients for the moment. Note that there is ongoing work by the community on the original `react-native-code-push` repository so we will be able to integrate this faster in case it gets finished.
|
|
131
70
|
|
|
71
|
+
Windows (UWP) won't be actively supported on v10+ except if there is demand for it (it will get stuck at the basic features of CodePush v9). Please contact hello@appzung.com to help us assess this demand. Thank you for your understanding.
|
|
132
72
|
|
|
133
|
-
|
|
73
|
+
We renamed "deployments" to "release channels" for better clarity between actual release deployments and their release channels.
|
|
134
74
|
|
|
135
|
-
|
|
75
|
+
### Migrating to AppZung CLI
|
|
136
76
|
|
|
137
|
-
1.
|
|
77
|
+
1. Use the AppZung CLI (`@appzung/cli`) instead of AppCenter's. See `npx @appzung/cli@1 welcome` and `npx @appzung/cli@1 --help`
|
|
78
|
+
2. Migrate your apps from AppCenter automatically in order to retain most of your config (project hierarchy, release channels public ID = deployment key...) using `npx @appzung/cli@1 codepush migrate`
|
|
79
|
+
3. Change your deployment process with `npx @appzung/cli@1 releases deploy-react-native` (see section ["Releasing Updates"](#releasing-updates) below)
|
|
138
80
|
|
|
139
|
-
|
|
81
|
+
### Migration steps to @appzung/react-native-code-push v7,v8,v9 or below
|
|
140
82
|
|
|
141
|
-
|
|
83
|
+
If your app does not meet the requirements of the last version of Microsoft's `react-native-code-push` (iOS 15.5, React Native 0.71+), from which this module is based on, you may still use old versions of `react-native-code-push` and specify `CodePushServerUrl` to `https://codepush.appzung.com`, as our API is compatible with the original module's features.
|
|
142
84
|
|
|
143
|
-
|
|
85
|
+
You may also use the versions that we published based on the versions v5-v9 with minimal changes:
|
|
144
86
|
|
|
145
|
-
|
|
87
|
+
1. Replace the `react-native-code-push` version with `npm:@appzung/react-native-code-push@9.0.2` (or 8.3.2, 7.1.1, 6.4.2, 6.3.1, 5.7.1) eg. `"react-native-code-push": "npm:@appzung/react-native-code-push@^8.3.2",`
|
|
88
|
+
2. Run `npm install` (or `yarn` depending on your project)
|
|
89
|
+
3. Run `bundle exec pod install`
|
|
90
|
+
4. That's it! In these versions you keep the old nomenclature DeploymentKey (vs new ReleaseChannelPublicId).
|
|
146
91
|
|
|
147
|
-
|
|
148
|
-
import codePush from "react-native-code-push";
|
|
92
|
+
### Migration steps to @appzung/react-native-code-push v10+
|
|
149
93
|
|
|
150
|
-
|
|
151
|
-
}
|
|
94
|
+
If you are less in a hurry, you can migrate to `@appzung/react-native-code-push` v10+ where we will add new features in the future and actively support the module.
|
|
152
95
|
|
|
153
|
-
|
|
154
|
-
```
|
|
96
|
+
#### Switch to @appzung/react-native-code-push npm package
|
|
155
97
|
|
|
156
|
-
|
|
98
|
+
1. Replace `react-native-code-push` in your package.json with `@appzung/react-native-code-push`: `@appzung/react-native-code-push: "^10.0.0"`
|
|
99
|
+
2. Run `npm install` (or `yarn` depending on your project)
|
|
157
100
|
|
|
158
|
-
|
|
159
|
-
import codePush from "react-native-code-push";
|
|
101
|
+
#### Change your JS code
|
|
160
102
|
|
|
161
|
-
|
|
162
|
-
|
|
103
|
+
1. Replace every `react-native-code-push` imports with `@appzung/react-native-code-push` imports
|
|
104
|
+
2. (optional) If you use a jest global mock, move the mock from `__mocks__/react-native-code-push.ts` to `__mocks__/@appzung/react-native-code-push.ts`
|
|
105
|
+
3. (optional) If you use dynamic deployment assignation, rename `deploymentKey` option to `releaseChannelPublicId` (TypeScript should catch that)
|
|
163
106
|
|
|
164
|
-
|
|
165
|
-
```
|
|
107
|
+
#### Change your iOS setup
|
|
166
108
|
|
|
167
|
-
|
|
109
|
+
1. Run `bundle exec pod install`
|
|
110
|
+
2. Rename `CodePushDeploymentKey` to `CodePushReleaseChannelPublicId` in your `Info.plist`
|
|
111
|
+
3. (optional) If you already use code signing, rename `CodePushPublicKey` to `CodePushSigningPublicKey` in your `Info.plist`
|
|
168
112
|
|
|
169
|
-
|
|
113
|
+
#### Change your Android setup
|
|
170
114
|
|
|
171
|
-
|
|
115
|
+
1. In `android/settings.gradle` change the lines about CodePush : `include ':appzung_react-native-code-push'` and `project(':appzung_react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/@appzung/react-native-code-push/android/app')`
|
|
116
|
+
2. In `android/app/build.gradle` change the line about CodePush: `apply from: "../../node_modules/@appzung/react-native-code-push/android/codepush.gradle"`
|
|
117
|
+
3. In your Android files (eg. `MainApplication.kt`), rename every `com.microsoft.codepush` prefix imports with `com.appzung.codepush`
|
|
118
|
+
4. Rename `CodePushDeploymentKey` to `CodePushReleaseChannelPublicId` in your strings resources (located either at strings.xml or app/build.gradle).
|
|
119
|
+
5. (optional) If you already use code signing, rename `CodePushPublicKey` to `CodePushSigningPublicKey` in your strings resources
|
|
172
120
|
|
|
173
|
-
|
|
174
|
-
import codePush from "react-native-code-push";
|
|
121
|
+
## Compatibility table
|
|
175
122
|
|
|
176
|
-
|
|
177
|
-
class MyApp extends Component {
|
|
178
|
-
}
|
|
179
|
-
```
|
|
123
|
+
We try our best to maintain backwards compatibility of our plugin with previous versions of React Native, but due to the nature of the platform, and the existence of breaking changes between releases, it is possible that you need to use a specific version of the CodePush plugin in order to support the exact version of React Native you are using. The following table outlines which CodePush plugin versions officially support the respective React Native versions:
|
|
180
124
|
|
|
181
|
-
|
|
125
|
+
| React Native version(s) | Android | iOS | Supporting CodePush version(s) |
|
|
126
|
+
|-------------------------|-----------------|------|--------------------------------|
|
|
127
|
+
| <0.59 | - | - | **Unsupported** |
|
|
128
|
+
| v0.59 | 4.1+ (TLS 1.2+) | 7 | v5.7.1 |
|
|
129
|
+
| v0.60-v0.61 | 4.1+ (TLS 1.2+) | 7 | v6.3.1 |
|
|
130
|
+
| v0.62-v0.64 | 4.1+ (TLS 1.2+) | 7 | v6.4.2 |
|
|
131
|
+
| v0.65-v0.70 | 4.1+ (TLS 1.2+) | 9 | v7.1.1 |
|
|
132
|
+
| v0.71+ | 4.1+ (TLS 1.2+) | 9 | v8.3.2 |
|
|
133
|
+
| v0.71+ | 4.1+ (TLS 1.2+) | 15.5 | v9.0.2 or v10+ |
|
|
182
134
|
|
|
183
|
-
|
|
184
|
-
import codePush from "react-native-code-push";
|
|
135
|
+
Our plugin will support new architecture but for the moment starting from 0.76 you will need to [opt out](https://reactnative.dev/blog/2024/10/23/the-new-architecture-is-here#opt-out) from new architecture.
|
|
185
136
|
|
|
186
|
-
|
|
187
|
-
}
|
|
137
|
+
We work hard to respond to new RN releases, but they do occasionally break us. We will update this chart with each RN release, so that users can check to see what our "official" support is.
|
|
188
138
|
|
|
189
|
-
|
|
190
|
-
```
|
|
139
|
+
Windows (UWP) won't be actively supported on v10+ except if there is demand for it (it will get stuck at the basic features of CodePush v9). Please contact hello@appzung.com to help us assess this demand. Thank you for your understanding.
|
|
191
140
|
|
|
192
|
-
|
|
141
|
+
## Usage
|
|
193
142
|
|
|
194
|
-
|
|
143
|
+
With the CodePush plugin downloaded and linked, and your app asking CodePush where to get the right JS bundle from, the only thing left is to add the necessary code to your app to control the following policies:
|
|
195
144
|
|
|
196
|
-
|
|
145
|
+
1. When (and how often) to check for an update? (for example app start, in response to clicking a button in a settings page, periodically at some fixed interval)
|
|
146
|
+
2. When an update is available, how to present it to the end user?
|
|
197
147
|
|
|
198
|
-
|
|
199
|
-
let codePushOptions = { checkFrequency: codePush.CheckFrequency.ON_APP_RESUME };
|
|
148
|
+
The simplest way to do this is to "CodePush-ify" your app's root component:
|
|
200
149
|
|
|
201
|
-
|
|
202
|
-
|
|
150
|
+
```javascript
|
|
151
|
+
import codePush from "@appzung/react-native-code-push";
|
|
203
152
|
|
|
204
|
-
|
|
205
|
-
|
|
153
|
+
const MyApp = () => {
|
|
154
|
+
}
|
|
206
155
|
|
|
207
|
-
|
|
156
|
+
export default codePush(MyApp);
|
|
157
|
+
```
|
|
208
158
|
|
|
209
|
-
|
|
210
|
-
let codePushOptions = { checkFrequency: codePush.CheckFrequency.ON_APP_RESUME };
|
|
159
|
+
By default, and this is recommended for production environments, CodePush will check for updates on every app start. If an update is available, it will be silently downloaded, and installed the next time the app is restarted (either explicitly by the end user or by the OS), which ensures the least invasive experience for your end users. If an available update is mandatory, then it will be installed immediately, ensuring that the end user gets it as soon as possible.
|
|
211
160
|
|
|
212
|
-
|
|
213
|
-
}
|
|
161
|
+
If you would like your app to discover updates more quickly, you can also choose to sync up with the CodePush server every time the app resumes from the background.
|
|
214
162
|
|
|
215
|
-
|
|
216
|
-
|
|
163
|
+
```javascript
|
|
164
|
+
codePush({ checkFrequency: codePush.CheckFrequency.ON_APP_RESUME })(MyApp);
|
|
165
|
+
```
|
|
217
166
|
|
|
218
|
-
Alternatively, if you want fine-grained control over when the check happens (like a button press or timer interval), you can call [`CodePush.sync()`](docs/api-js.md#codepushsync) at any time with your desired `SyncOptions`, and
|
|
167
|
+
Alternatively, if you want fine-grained control over when the check happens (like a button press or timer interval), eg. in a staging environment, you can call [`CodePush.sync()`](docs/api-js.md#codepushsync) at any time with your desired `SyncOptions`, and turn off CodePush's automatic checking by specifying a manual `checkFrequency`:
|
|
219
168
|
|
|
220
169
|
```javascript
|
|
221
|
-
|
|
170
|
+
import codePush from "@appzung/react-native-code-push";
|
|
222
171
|
|
|
223
172
|
class MyApp extends Component {
|
|
224
173
|
onButtonPress() {
|
|
@@ -239,137 +188,88 @@ class MyApp extends Component {
|
|
|
239
188
|
}
|
|
240
189
|
}
|
|
241
190
|
|
|
242
|
-
|
|
191
|
+
export default codePush({ checkFrequency: codePush.CheckFrequency.MANUAL })(MyApp);
|
|
243
192
|
```
|
|
244
193
|
|
|
245
194
|
If you would like to display an update confirmation dialog (an "active install"), configure when an available update is installed (like force an immediate restart) or customize the update experience in any other way, refer to the [`codePush()`](docs/api-js.md#codepush) API reference for information on how to tweak this default behavior.
|
|
246
195
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
### Store Guideline Compliance
|
|
250
|
-
|
|
251
|
-
Android Google Play and iOS App Store have corresponding guidelines that have rules you should be aware of before integrating the CodePush solution within your application.
|
|
252
|
-
|
|
253
|
-
#### Google play
|
|
196
|
+
## Releasing updates
|
|
254
197
|
|
|
255
|
-
|
|
256
|
-
> This restriction does not apply to code that runs in a virtual machine and has limited access to Android APIs (such as JavaScript in a webview or browser).
|
|
257
|
-
|
|
258
|
-
That fully allow CodePush as it updates just JS bundles and can't update native code part.
|
|
259
|
-
|
|
260
|
-
#### App Store
|
|
261
|
-
|
|
262
|
-
Paragraph **3.3.2**, since back in 2015's [Apple Developer Program License Agreement](https://developer.apple.com/programs/ios/information/) fully allowed performing over-the-air updates of JavaScript and assets - and in its latest version (20170605) [downloadable here](https://developer.apple.com/terms/) this ruling is even broader:
|
|
263
|
-
|
|
264
|
-
> Interpreted code may be downloaded to an Application but only so long as such code: (a) does not change the primary purpose of the Application by providing features or functionality that are inconsistent with the intended and advertised purpose of the Application as submitted to the App Store, (b) does not create a store or storefront for other code or applications, and (c) does not bypass signing, sandbox, or other security features of the OS.
|
|
265
|
-
|
|
266
|
-
CodePush allows you to follow these rules in full compliance so long as the update you push does not significantly deviate your product from its original App Store approved intent.
|
|
267
|
-
|
|
268
|
-
To further remain in compliance with Apple's guidelines we suggest that App Store-distributed apps don't enable the `updateDialog` option when calling `sync`, since in the [App Store Review Guidelines](https://developer.apple.com/app-store/review/guidelines/) it is written that:
|
|
269
|
-
|
|
270
|
-
> Apps must not force users to rate the app, review the app, download other apps, or other similar actions in order to access functionality, content, or use of the app.
|
|
198
|
+
Once your app is configured and distributed to your users, and you have made some JS or asset changes, it's time to release them. The recommended way to release them is using the `appzung releases deploy-react-native` command in the AppZung CLI, which will bundle your JavaScript files, asset files, and release the update to the CodePush server.
|
|
271
199
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
## Releasing Updates
|
|
200
|
+
### Locally
|
|
275
201
|
|
|
276
|
-
|
|
202
|
+
*NOTE: Before you can start releasing updates, please log into AppZung by running the `appzung auth login` command.*
|
|
277
203
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
In its most basic form, this command only requires one parameter: your owner name + "/" + app name.
|
|
204
|
+
In its most basic form, this command looks like this:
|
|
281
205
|
|
|
282
206
|
```shell
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
appcenter codepush release-react -a <ownerName>/MyApp-iOS
|
|
286
|
-
appcenter codepush release-react -a <ownerName>/MyApp-Android
|
|
207
|
+
appzung releases deploy-react-native
|
|
287
208
|
```
|
|
288
209
|
|
|
289
|
-
The `
|
|
210
|
+
The `appzung releases deploy-react-native` command enables such a simple workflow because it provides many sensible defaults (like generating a release bundle, assuming your app's entry file on iOS is either `index.ios.js` or `index.js`). However, all of these defaults can be customized to allow incremental flexibility as necessary, which makes it a good fit for most scenarios. Here are common use-cases:
|
|
290
211
|
|
|
291
212
|
```shell
|
|
292
|
-
# Release a mandatory update with a changelog
|
|
293
|
-
|
|
213
|
+
# Release a mandatory update with a changelog from the last git commit (useful for staging releases)
|
|
214
|
+
appzung releases deploy-react-native -m --description-from-current-git-commit
|
|
294
215
|
|
|
295
|
-
#
|
|
296
|
-
|
|
297
|
-
appcenter codepush release-react -a <ownerName>/MyApp-iOS --entry-file MyApp.js --sourcemap-output ../maps/MyApp.map
|
|
216
|
+
# Force using hermes since auto-detection is not always possible. In a future version of the CLI use hermes will be enabled by default and there will be a --no-hermes flag instead.
|
|
217
|
+
appzung releases deploy-react-native --use-hermes
|
|
298
218
|
|
|
299
|
-
#
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
# Release an update that targets users running any 1.1.* binary, as opposed to
|
|
303
|
-
# limiting the update to exact version name in the build.gradle file
|
|
304
|
-
appcenter codepush release-react -a <ownerName>/MyApp-Android --target-binary-version "~1.1.0"
|
|
219
|
+
# Auto detecting the release version might not be a good strategy in a production app with multiple environments so you can specify the version
|
|
220
|
+
appzung releases deploy-react-native --target-binary-version "1.1.2"
|
|
305
221
|
|
|
222
|
+
# See other flags
|
|
223
|
+
appzung releases deploy-react-native --help
|
|
306
224
|
```
|
|
307
225
|
|
|
308
226
|
The CodePush client supports differential updates, so even though you are releasing your JS bundle and assets on every update, your end users will only actually download the files they need. The service handles this automatically so that you can focus on creating awesome apps and we can worry about optimizing end user downloads.
|
|
309
227
|
|
|
310
|
-
For more details about how the `
|
|
228
|
+
For more details about how the `appzung releases deploy-react-native` command works, as well as the various parameters it exposes, refer to the `appzung releases deploy-react-native --help` command. Additionally, if you would prefer to handle running the `react-native bundle` command yourself, and therefore, want an even more flexible solution than `appzung releases deploy-react-native`, refer to the `appzung releases deploy --help` command for more details.
|
|
311
229
|
|
|
312
|
-
If you run into any issues, or have any questions/comments/feedback, you can
|
|
230
|
+
If you run into any issues, or have any questions/comments/feedback, you can check out the [troubleshooting](#debugging--troubleshooting) details below or email us at support@appzung.com.
|
|
313
231
|
|
|
314
232
|
*NOTE: CodePush updates should be tested in modes other than Debug mode. In Debug mode, React Native app always downloads JS bundle generated by packager, so JS bundle downloaded by CodePush does not apply.*
|
|
315
233
|
|
|
316
|
-
###
|
|
317
|
-
|
|
318
|
-
In our [getting started](#getting-started) docs, we illustrated how to configure the CodePush plugin using a specific deployment key. However, in order to effectively test your releases, it is critical that you leverage the `Staging` and `Production` deployments that are auto-generated when you first created your CodePush app (or any custom deployments you may have created). This way, you never release an update to your end users that you haven't been able to validate yourself.
|
|
319
|
-
|
|
320
|
-
*NOTE: Our client-side rollback feature can help unblock users after installing a release that resulted in a crash, and server-side rollbacks (i.e. `appcenter codepush rollback`) allow you to prevent additional users from installing a bad release once it's been identified. However, it's obviously better if you can prevent an erroneous update from being broadly released in the first place.*
|
|
321
|
-
|
|
322
|
-
Taking advantage of the `Staging` and `Production` deployments allows you to achieve a workflow like the following (feel free to customize!):
|
|
234
|
+
### On CI
|
|
323
235
|
|
|
324
|
-
|
|
236
|
+
You would typically release updates in a CI though, so the command will need the release channel and a project secret API key that you previously create with `appzung projects api-keys create`.
|
|
325
237
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
4. Run your production/release build of your app, sync the update from the server and verify it works as expected
|
|
331
|
-
|
|
332
|
-
*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 `appcenter codepush promote -a <ownerName>/<appName> -s Staging -d Production -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 `appcenter codepush patch -a <ownerName>/<appName> Production -r 100`.*
|
|
238
|
+
```shell
|
|
239
|
+
appzung releases deploy-react-native --release-channel $APPZUNG_RELEASE_CHANNEL_ID_ANDROID --description-from-current-git-commit --use-hermes --disable-duplicate-release-error --api-key $APPZUNG_API_KEY
|
|
240
|
+
appzung releases deploy-react-native --release-channel $APPZUNG_RELEASE_CHANNEL_ID_IOS --description-from-current-git-commit --use-hermes --disable-duplicate-release-error --api-key $APPZUNG_API_KEY
|
|
241
|
+
```
|
|
333
242
|
|
|
334
|
-
|
|
243
|
+
We will publish a guide with best practices and workflows examples for GitHub Actions and Bitrise.
|
|
335
244
|
|
|
336
|
-
|
|
337
|
-
* [iOS](docs/multi-deployment-testing-ios.md)
|
|
245
|
+
### Advanced usage
|
|
338
246
|
|
|
247
|
+
See the corresponding documentation file about [Advanced usage](./docs/advanced-usage.md).
|
|
339
248
|
|
|
340
|
-
|
|
249
|
+
## Store guidelines compliance
|
|
341
250
|
|
|
342
|
-
|
|
251
|
+
Android Google Play and iOS App Store have corresponding guidelines that have rules you should be aware of before integrating the CodePush solution within your application.
|
|
343
252
|
|
|
344
|
-
|
|
253
|
+
### Google play
|
|
345
254
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
// which includes the deployment key that the current user should use.
|
|
349
|
-
codePush.sync({ deploymentKey: userProfile.CODEPUSH_KEY });
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
With that change in place, now it's just a matter of choosing how your app determines the right deployment key for the current user. In practice, there are typically two solutions for this:
|
|
255
|
+
Third paragraph of [Device and Network Abuse](https://support.google.com/googleplay/android-developer/answer/9888379?hl=en) topic describe that updating source code by any method other than Google Play's update mechanism is restricted. But this restriction does not apply to updating javascript bundles.
|
|
256
|
+
> This restriction does not apply to code that runs in a virtual machine and has limited access to Android APIs (such as JavaScript in a webview or browser).
|
|
353
257
|
|
|
354
|
-
|
|
258
|
+
That fully allow CodePush as it updates just JS bundles and can't update native code part.
|
|
355
259
|
|
|
356
|
-
|
|
260
|
+
### App Store
|
|
357
261
|
|
|
358
|
-
|
|
262
|
+
Paragraph **3.3.2**, since back in 2015's [Apple Developer Program License Agreement](https://developer.apple.com/programs/ios/information/) fully allowed performing over-the-air updates of JavaScript and assets - and in its latest version (20170605) [downloadable here](https://developer.apple.com/terms/) this ruling is even broader:
|
|
359
263
|
|
|
360
|
-
|
|
264
|
+
> Interpreted code may be downloaded to an Application but only so long as such code: (a) does not change the primary purpose of the Application by providing features or functionality that are inconsistent with the intended and advertised purpose of the Application as submitted to the App Store, (b) does not create a store or storefront for other code or applications, and (c) does not bypass signing, sandbox, or other security features of the OS.
|
|
361
265
|
|
|
362
|
-
|
|
363
|
-
// #1) Create your new deployment to hold releases of a specific app variant
|
|
364
|
-
appcenter codepush deployment add -a <ownerName>/<appName> test-variant-one
|
|
266
|
+
CodePush allows you to follow these rules in full compliance so long as the update you push does not significantly deviate your product from its original App Store approved intent.
|
|
365
267
|
|
|
366
|
-
|
|
367
|
-
appcenter codepush release-react -a <ownerName>/<appName> -d test-variant-one
|
|
368
|
-
```
|
|
268
|
+
To further remain in compliance with Apple's guidelines we suggest that App Store-distributed apps don't enable the `updateDialog` option when calling `sync`, since in the [App Store Review Guidelines](https://developer.apple.com/app-store/review/guidelines/) it is written that:
|
|
369
269
|
|
|
370
|
-
|
|
270
|
+
> Apps must not force users to rate the app, review the app, download other apps, or other similar actions in order to access functionality, content, or use of the app.
|
|
371
271
|
|
|
372
|
-
|
|
272
|
+
This is not necessarily the case for `updateDialog`, since it won't force the user to download the new version, but at least you should be aware of that ruling if you decide to show it.
|
|
373
273
|
|
|
374
274
|
## API Reference
|
|
375
275
|
|
|
@@ -377,34 +277,15 @@ appcenter codepush release-react -a <ownerName>/<appName> -d test-variant-one
|
|
|
377
277
|
* [Objective-C API Reference (iOS)](docs/api-ios.md)
|
|
378
278
|
* [Java API Reference (Android)](docs/api-android.md)
|
|
379
279
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
The React Native community has graciously created some awesome open source apps that can serve as examples for developers that are getting started. The following is a list of OSS React Native apps that are also using CodePush, and can therefore be used to see how others are using the service:
|
|
383
|
-
|
|
384
|
-
* [F8 App](https://github.com/fbsamples/f8app) - The official conference app for [F8 2016](https://www.fbf8.com/).
|
|
385
|
-
* [Feline for Product Hunt](https://github.com/arjunkomath/Feline-for-Product-Hunt) - An Android client for Product Hunt.
|
|
386
|
-
* [GeoEncoding](https://github.com/LynxITDigital/GeoEncoding) - An app by [Lynx IT Digital](https://digital.lynxit.com.au) which demonstrates how to use numerous React Native components and modules.
|
|
387
|
-
* [Math Facts](https://github.com/Khan/math-facts) - An app by Khan Academy to help memorize math facts more easily.
|
|
280
|
+
## Debugging / Troubleshooting
|
|
388
281
|
|
|
389
|
-
|
|
282
|
+
The `sync` method includes a lot of diagnostic logging out-of-the-box, so if you're encountering an issue when using it, the best thing to try first is examining the output logs of your app. This will tell you whether the app is configured correctly (like can the plugin find your release channel public ID?), if the app is able to reach the server, if an available update is being discovered, if the update is being successfully downloaded/installed, etc. We want to continue improving the logging to be as intuitive/comprehensive as possible, so please [let us know](mailto:support@appzung.com) if you find it to be confusing or missing anything.
|
|
390
283
|
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
*Note: If you've developed a React Native app using CodePush, that is also open-source, please let us know. We would love to add it to this list!*
|
|
394
|
-
|
|
395
|
-
### Debugging / Troubleshooting
|
|
396
|
-
|
|
397
|
-
The `sync` method includes a lot of diagnostic logging out-of-the-box, so if you're encountering an issue when using it, the best thing to try first is examining the output logs of your app. This will tell you whether the app is configured correctly (like can the plugin find your deployment key?), if the app is able to reach the server, if an available update is being discovered, if the update is being successfully downloaded/installed, etc. We want to continue improving the logging to be as intuitive/comprehensive as possible, so please [let us know](mailto:codepushfeed@microsoft.com) if you find it to be confusing or missing anything.
|
|
398
|
-
|
|
399
|
-
The simplest way to view these logs is to add the flag `--debug` for each command. This will output a log stream that is filtered to just CodePush messages. This makes it easy to identify issues, without needing to use a platform-specific tool, or wade through a potentially high volume of logs.
|
|
400
|
-
|
|
401
|
-
<img width="540" alt="screen shot 2016-06-21 at 10 15 42 am" src="https://cloud.githubusercontent.com/assets/116461/16246973/838e2e98-37bc-11e6-9649-685f39e325a0.png">
|
|
402
|
-
|
|
403
|
-
Additionally, you can also use any of the platform-specific tools to view the CodePush logs, if you are more comfortable with them. Simple start up the Chrome DevTools Console, the Xcode Console (iOS), the [OS X Console](https://en.wikipedia.org/wiki/Console_%28OS_X%29#.7E.2FLibrary.2FLogs) (iOS) and/or ADB logcat (Android), and look for messages which are prefixed with `[CodePush]`.
|
|
284
|
+
Start up the Chrome DevTools Console, the Xcode Console (iOS) and/or ADB logcat (Android), and look for messages which are prefixed with `[CodePush]`.
|
|
404
285
|
|
|
405
286
|
Note that by default, React Native logs are disabled on iOS in release builds, so if you want to view them in a release build, you need to make the following changes to your `AppDelegate.m` file:
|
|
406
287
|
|
|
407
|
-
1. Add an `#import <React/RCTLog.h>` statement
|
|
288
|
+
1. Add an `#import <React/RCTLog.h>` statement
|
|
408
289
|
|
|
409
290
|
2. Add the following statement to the top of your `application:didFinishLaunchingWithOptions` method:
|
|
410
291
|
|
|
@@ -414,30 +295,12 @@ Note that by default, React Native logs are disabled on iOS in release builds, s
|
|
|
414
295
|
|
|
415
296
|
Now you'll be able to see CodePush logs in either debug or release mode, on both iOS or Android. If examining the logs don't provide an indication of the issue, please refer to the following common issues for additional resolution ideas:
|
|
416
297
|
|
|
417
|
-
| Issue / Symptom
|
|
418
|
-
|
|
419
|
-
| Compilation Error
|
|
420
|
-
| Network timeout / hang when calling `sync` or `checkForUpdate` in the iOS Simulator
|
|
421
|
-
| Server responds with a `404` when calling `sync` or `checkForUpdate`
|
|
422
|
-
| Update not being discovered
|
|
423
|
-
| Update not being displayed after restart
|
|
424
|
-
| I've released an update for iOS but my Android app also shows an update and it breaks it | Be sure you have different
|
|
425
|
-
| I've released new update but changes are not reflected
|
|
426
|
-
| No JS bundle is being found when running your app against the iOS simulator | By default, React Native doesn't generate your JS bundle when running against the simulator. Therefore, if you're using `[CodePush bundleURL]`, and targetting the iOS simulator, you may be getting a `nil` result. This issue will be fixed in RN 0.22.0, but only for release builds. You can unblock this scenario right now by making [this change](https://github.com/facebook/react-native/commit/9ae3714f4bebdd2bcab4d7fdbf23acebdc5ed2ba) locally.
|
|
427
|
-
|
|
428
|
-
### Continuous Integration / Delivery
|
|
429
|
-
|
|
430
|
-
In addition to being able to use the CodePush CLI to "manually" release updates, we believe that it's important to create a repeatable and sustainable solution for contiously delivering updates to your app. That way, it's simple enough for you and/or your team to create and maintain the rhythm of performing agile deployments. In order to assist with setting up a CodePush-based CD pipeline, refer to the following integrations with various CI servers:
|
|
431
|
-
|
|
432
|
-
* [Visual Studio Team Services](https://marketplace.visualstudio.com/items?itemName=ms-vsclient.code-push) - *NOTE: VSTS also has extensions for publishing to [HockeyApp](https://marketplace.visualstudio.com/items?itemName=ms.hockeyapp) and the [Google Play](https://github.com/microsoft/google-play-vsts-extension) store, so it provides a pretty great mobile CD solution in general.*
|
|
433
|
-
* [Travis CI](https://github.com/mondora/code-push-travis-cli)
|
|
434
|
-
|
|
435
|
-
Additionally, if you'd like more details of what a complete mobile CI/CD workflow can look like, which includes CodePush, check out this [excellent article](https://medium.com/zeemee-engineering/zeemee-engineering-and-the-quest-for-the-holy-mobile-dev-grail-1310be4953d1) by the [ZeeMee engineering team](https://www.zeemee.com/).
|
|
436
|
-
|
|
437
|
-
### TypeScript Consumption
|
|
438
|
-
|
|
439
|
-
This module ships its `*.d.ts` file as part of its NPM package, which allows you to simply `import` it, and receive intellisense in supporting editors (like Visual Studio Code), as well as compile-time type checking if you're using TypeScript. For the most part, this behavior should just work out of the box, however, if you've specified `es6` as the value for either the `target` or `module` [compiler option](http://www.typescriptlang.org/docs/handbook/compiler-options.html) in your [`tsconfig.json`](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html) file, then just make sure that you also set the `moduleResolution` option to `node`. This ensures that the TypeScript compiler will look within the `node_modules` for the type definitions of imported modules. Otherwise, you'll get an error like the following when trying to import the `react-native-code-push` module: `error TS2307: Cannot find module 'react-native-code-push'`.
|
|
440
|
-
|
|
441
|
-
---
|
|
442
|
-
|
|
443
|
-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
|
298
|
+
| Issue / Symptom | Possible Solution |
|
|
299
|
+
|------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
300
|
+
| Compilation Error | Double-check that your version of React Native is [compatible](#compatibility-table) with the CodePush version you are using. |
|
|
301
|
+
| Network timeout / hang when calling `sync` or `checkForUpdate` in the iOS Simulator | Try resetting the simulator by selecting the `Simulator -> Reset Content and Settings..` menu item, and then re-running your app. |
|
|
302
|
+
| Server responds with a `404` when calling `sync` or `checkForUpdate` | Double-check that the release channel public ID you added to your `Info.plist` (iOS), `strings.xml` or `app/build.gradle` (Android) or that you're passing to `sync`/`checkForUpdate`, is in fact correct. You can run `appzung release-channels list` to view the correct public ID for your app release channel. |
|
|
303
|
+
| Update not being discovered | Double-check that the version of your running app (like `1.0.0`) matches the version you specified when releasing the update to CodePush. Additionally, make sure that you are releasing to the same release channel that your app is configured to sync with. |
|
|
304
|
+
| Update not being displayed after restart | If you're not calling `sync` on app start (like within `componentDidMount` of your root component), then you need to explicitly call `notifyApplicationReady` on app start, otherwise, the plugin will think your update failed and roll it back. |
|
|
305
|
+
| I've released an update for iOS but my Android app also shows an update and it breaks it | Be sure you have different release channels for each platform in order to receive updates correctly |
|
|
306
|
+
| I've released new update but changes are not reflected | Be sure that you are running app in modes other than Debug. In Debug mode, React Native app always downloads JS bundle generated by packager, so JS bundle downloaded by CodePush does not apply. |
|