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

Commit ba8d528

Browse files
committed
Adding note about rollout and disabled to checkForUpdate
1 parent 40f176e commit ba8d528

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,16 +497,18 @@ See [disallowRestart](#codepushdisallowrestart) for an example of how this metho
497497
codePush.checkForUpdate(deploymentKey: String = null): Promise<RemotePackage>;
498498
```
499499
500-
Queries the CodePush service to see whether the configured app deployment has an update available. By default, it will use the deployment key that is configured in your `Info.plist` file (iOS), or `MainActivity.java` file (Android), but you can override that by specifying a value via the optional `deploymentKey` parameter. This can be useful when you want to dynamically "redirect" a user to a specific deployment, such as allowing "Early access" via an easter egg or a user setting switch.
500+
Queries the CodePush service to see whether the configured app deployment has an update available. By default, it will use the deployment key that is configured in your `Info.plist` file (iOS), or `MainActivity.java` file (Android), but you can override that by specifying a value via the optional `deploymentKey` parameter. This can be useful when you want to dynamically "redirect" a user to a specific deployment, such as allowing "early access" via an easter egg or a user setting switch.
501501
502502
This method returns a `Promise` which resolves to one of two possible values:
503503
504-
1. `null` if there is no update available. This occurs in the following scenarios:
504+
1. `null` if there is no update available. This can occur in the following scenarios:
505505
506506
1. The configured deployment doesn't contain any releases, and therefore, nothing to update.
507507
2. The latest release within the configured deployment is targeting a different binary version than what you're currently running (either older or newer).
508508
3. The currently running app already has the latest release from the configured deployment, and therefore, doesn't need it again.
509-
509+
4. The latest release within the configured deployment is currently marked as disabled, and therefore, isn't allowed to be downloaded.
510+
5. The latest release within the configured deployment is in an "active rollout" state, and the requesting device doesn't fall within the percentage of users who are eligible for it.
511+
510512
2. A [`RemotePackage`](#remotepackage) instance which represents an available update that can be inspected and/or subsequently downloaded.
511513

512514
Example Usage:

0 commit comments

Comments
 (0)