Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 35b2f76

Browse files
committed
Updating README to include new parameter
1 parent 7c3c5f5 commit 35b2f76

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,9 @@ Contains details about an update package that has been downloaded locally or alr
248248
- __isFirstRun__: Flag indicating whether this is the first time the package has been run after being applied. (Boolean) This is useful for determining whether you would like to show a "What's New?" UI to the end-user after applying an update.
249249

250250
##### Methods
251-
- __apply(rollbackTimeout): Promise__: Applies this package to the application. The application will be reloaded with this package and on every application launch this package will be loaded.
252-
If the rollbackTimeout parameter is provided, the application will wait for a `notifyApplicationReady` for the given number of milliseconds.
253-
If `notifyApplicationReady` is called before the time period specified by rollbackTimeout, the apply operation is considered a success.
254-
Otherwise, the apply operation will be marked as failed, and the application is reverted to its previous version.
251+
- __apply(rollbackTimeout: Number = 0, restartImmediately: Boolean = true): Promise&lt;void&gt;__: Applies this package to the application, by unzipping its contents (e.g. the JS bundle) and saving it to the location on disk that the runtime expects to find the latest version of the app. If you pass a truthy value to the `restartImmediately` parameter, then after performing the apply, the app will be immediately restarted, so that the end-user sees the changes. Otherwise, the apply will complete, but they won't take affect until the next time that the app is started (i.e. the user starts your app after they or the OS killed it).<br /><br /> If a value greater then zero is provided to the `rollbackTimeout` parameter, the application will wait for the `notifyApplicationReady` method to be called for the given number of milliseconds.
252+
If `notifyApplicationReady` is called before the time period specified by rollbackTimeout, the apply operation is considered a success. If the method isn't called within that period, the update will be assumed to have failed and the application will be automatically rolled back to the previous version.<br /><br />
253+
Note: The "rollback timer" doesn't start until the update has actually become active. If you pass a truthy value to the `restartImmediately` parameter, then the rollback timer will also start immediately. However, if you pass a falsey value, then the rollback timer will start the next time the app starts, not at the point that you called `apply`.
255254

256255
#### RemotePackage
257256

0 commit comments

Comments
 (0)