Skip to content

Commit cb7fb4b

Browse files
committed
Update README
1 parent a2c04ac commit cb7fb4b

1 file changed

Lines changed: 20 additions & 21 deletions

File tree

README.md

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ This `@appzung/react-native-code-push` package aims to be a drop-in replacement
6969

7070
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).
7171

72-
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.
72+
This package is compatible with the new architecture (iOS and Android) on v11+.
7373

7474
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.
7575

@@ -102,17 +102,16 @@ See the [corresponding steps](./docs/migrating-to-v10.md).
102102

103103
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:
104104

105-
| React Native version(s) | Android | iOS | Supporting CodePush version(s) |
106-
| ----------------------- | --------------- | ---- | ------------------------------ |
107-
| <0.59 | - | - | **Unsupported** |
108-
| v0.59 | 4.1+ (TLS 1.2+) | 7 | v5.7.1 |
109-
| v0.60-v0.61 | 4.1+ (TLS 1.2+) | 7 | v6.3.1 |
110-
| v0.62-v0.64 | 4.1+ (TLS 1.2+) | 7 | v6.4.2 |
111-
| v0.65-v0.70 | 4.1+ (TLS 1.2+) | 9 | v7.1.1 |
112-
| v0.71+ | 4.1+ (TLS 1.2+) | 9 | v8.3.2 |
113-
| v0.71+ | 4.1+ (TLS 1.2+) | 15.5 | v9.0.2 or v10+ |
114-
115-
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.
105+
| React Native version(s) | Android | iOS | Old arch | New arch | Supporting CodePush version(s) |
106+
| ----------------------- | --------------- | ---- | -------- | -------- | ------------------------------ |
107+
| <0.59 | - | - ||| **Unsupported** |
108+
| v0.59 | 4.1+ (TLS 1.2+) | 7 ||| v5.7.1 |
109+
| v0.60-v0.61 | 4.1+ (TLS 1.2+) | 7 ||| v6.3.1 |
110+
| v0.62-v0.64 | 4.1+ (TLS 1.2+) | 7 ||| v6.4.2 |
111+
| v0.65-v0.70 | 4.1+ (TLS 1.2+) | 9 ||| v7.1.1 |
112+
| v0.71+ | 4.1+ (TLS 1.2+) | 9 ||| v8.3.2 |
113+
| v0.71+ | 4.1+ (TLS 1.2+) | 15.5 ||| v9.0.2 or v10+ |
114+
| v0.74+ | 4.1+ (TLS 1.2+) | 15.5 ||| v11+ |
116115

117116
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.
118117

@@ -128,31 +127,31 @@ With the CodePush plugin downloaded and linked, and your app asking CodePush whe
128127
The simplest way to do this is to "CodePush-ify" your app's root component:
129128

130129
```javascript
131-
import codePush from '@appzung/react-native-code-push';
130+
import withCodePush from '@appzung/react-native-code-push';
132131

133132
const MyApp = () => {};
134133

135-
export default codePush(MyApp);
134+
export default withCodePush(MyApp);
136135
```
137136

138137
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.
139138

140139
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.
141140

142141
```javascript
143-
codePush({ checkFrequency: codePush.CheckFrequency.ON_APP_RESUME })(MyApp);
142+
withCodePush({ checkFrequency: CheckFrequency.ON_APP_RESUME })(MyApp);
144143
```
145144

146145
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`:
147146

148147
```javascript
149-
import codePush from '@appzung/react-native-code-push';
148+
import withCodePush, { CheckFrequency, InstallMode } from '@appzung/react-native-code-push';
150149

151150
class MyApp extends Component {
152151
onButtonPress() {
153-
codePush.sync({
152+
CodePush.sync({
154153
updateDialog: true,
155-
installMode: codePush.InstallMode.IMMEDIATE,
154+
installMode: InstallMode.IMMEDIATE,
156155
});
157156
}
158157

@@ -167,7 +166,7 @@ class MyApp extends Component {
167166
}
168167
}
169168

170-
export default codePush({ checkFrequency: codePush.CheckFrequency.MANUAL })(MyApp);
169+
export default withCodePush({ checkFrequency: CheckFrequency.MANUAL })(MyApp);
171170
```
172171

173172
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.
@@ -277,10 +276,10 @@ Now you'll be able to see CodePush logs in either debug or release mode, on both
277276
278277
| Issue / Symptom | Possible Solution |
279278
| ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
280-
| Compilation Error | Double-check that your version of React Native is [compatible](#compatibility-table) with the CodePush version you are using. |
279+
| Compilation Error | Clean your build folders and double-check that your version of React Native is [compatible](#compatibility-table) with the CodePush version you are using. |
281280
| 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. |
282281
| 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. |
283282
| 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. |
284-
| 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. |
283+
| Update not being displayed after restart | If you're not using the withCodePush HOC or calling `sync` on app start (like within `componentDidMount` of your root component), then you need to explicitly call `notifyAppReady` on app start, otherwise, the plugin will think your update failed and roll it back. |
285284
| 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 |
286285
| 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. |

0 commit comments

Comments
 (0)