You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 20, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ To let the CodePush runtime know which deployment it should query for updates ag
73
73
74
74
## Plugin consumption
75
75
76
-
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 neccessary code to your app to control the following:
76
+
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:
77
77
78
78
1. When (and how often) to check for an update? (e.g. app start, in response to clicking a button in a settings page, periodically at some fixed interval)
79
79
2. When an update is available, how to present it to the end-user?
@@ -159,7 +159,7 @@ This method returns a Promise that resolves with the `LocalPackage` instance tha
159
159
codePush.notifyApplicationReady():Promise<void>;
160
160
```
161
161
162
-
Notifies the CodePush runtime that an update is considered successful, and therefore, a rollback isn't neccessary. Calling this function is required whenever the `rollbackTimeout` parameter is specified when calling either ```LocalPackage.install``` or `sync`. If you specify a `rollbackTimeout`, and don't call `notifyApplicationReady`, the CodePush runtime will assume that the installed update has failed and roll back to the previous version.
162
+
Notifies the CodePush runtime that an update is considered successful, and therefore, a rollback isn't necessary. Calling this function is required whenever the `rollbackTimeout` parameter is specified when calling either ```LocalPackage.install``` or `sync`. If you specify a `rollbackTimeout`, and don't call `notifyApplicationReady`, the CodePush runtime will assume that the installed update has failed and roll back to the previous version.
163
163
164
164
If the `rollbackTimeout` parameter was not specified, the CodePush runtime will not enforce any automatic rollback behavior, and therefore, calling this function is not required and will result in a no-op.
165
165
@@ -184,7 +184,7 @@ codePush.sync(options: Object, syncStatusChangeCallback: function(syncStatus: Nu
184
184
185
185
Provides a simple method for checking for an update and subsequently downloading and installing it. This method provides support for two different (but customizable) "modes" to easily enables apps with different requirements:
186
186
187
-
1. **Silent mode** *(the default behavior)*, which automatically downloads available updates, and applies them the next time the app restarts. This way, the entire update experience is "silent" to the end-user, since they don't see any update prompt and/or "synthentic" app restarts.
187
+
1. **Silent mode** *(the default behavior)*, which automatically downloads available updates, and applies them the next time the app restarts. This way, the entire update experience is "silent" to the end-user, since they don't see any update prompt and/or "synthetic" app restarts.
188
188
189
189
2. **Active mode**, which when an update is available, prompts the end-user for permission before downloading it, and then immediately applies the update. If an update was released using the `mandatory` flag, the end-user would still be notified about the update, but they wouldn't have the choice to ignore it.
190
190
@@ -252,7 +252,7 @@ In addition to the options, the `sync` method also accepts two optional function
252
252
*__CodePush.SyncStatus.CHECKING_FOR_UPDATE__*(0)* - The CodePush server is being queried for an update.
253
253
*__CodePush.SyncStatus.AWAITING_USER_ACTION__*(1)* - An update is available, and a confirmation dialog was shown to the end-user. (This is only applicable when the `updateDialog` is used)
254
254
*__CodePush.SyncStatus.DOWNLOADING_PACKAGE__*(2)* - An available update is being downloaded from the CodePush server.
255
-
*__CodePush.SyncStatus.INSTALLING_UPDATE__*(3)* - An available udpate was downloaded and is about to be installed.
255
+
*__CodePush.SyncStatus.INSTALLING_UPDATE__*(3)* - An available update was downloaded and is about to be installed.
256
256
*__CodePush.SyncStatus.UP_TO_DATE__*(4)* - The app is fully up-to-date with the configured deployment.
257
257
*__CodePush.SyncStatus.UPDATE_IGNORED__*(5)* - The app has an optional update, which the end-user chose to ignore. (This is only applicable when the `updateDialog` is used)
258
258
*__CodePush.SyncStatus.UPDATE_INSTALLED__*(6)* - An available update has been installed and will be run either immediately after the syncStatusCallback function returns or the next time the app resumes/restarts, depending on the `InstallMode` specified in `SyncOptions`.
@@ -285,7 +285,7 @@ The method returns a `Promise` that is resolved with a `SyncStatus` code that in
285
285
*__CodePush.SyncStatus.UPDATE_IGNORED__*(5)* - The app has an optional update, that the user chose to ignore.
286
286
*__CodePush.SyncStatus.UPDATE_INSTALLED__*(6)* - The update has been installed and will be run either immediately after the syncStatusCallback function returns or the next time the app resumes/restarts, depending on the `InstallMode` specified in `SyncOptions`.
287
287
288
-
If the update check and/or the subseqeuent download fails for any reason, the `Promise` object returned by `sync` will be rejected with the reason.
288
+
If the update check and/or the subsequent download fails for any reason, the `Promise` object returned by `sync` will be rejected with the reason.
289
289
290
290
The `sync` method can be called anywhere you'd like to check for an update. That could be in the `componentWillMount` lifecycle event of your root component, the onPress handler of a `<TouchableHighlight>` component, in the callback of a periodic timer, or whatever else makes sense for your needs. Just like the `checkForUpdate` method, it will perform the network request to check for an update in the background, so it won't impact your UI thread and/or JavaScript thread's responsiveness.
0 commit comments