SDK API methods
All methods live on the default export. Most apps only need sync(); the rest give you manual control.
| Method | Returns | Purpose |
|---|---|---|
checkForUpdate(deploymentKey?, handleBinaryVersionMismatchCallback?) |
Promise<RemotePackage | null> |
Ask the server for an update. null when the app is up to date. The optional key checks a different deployment. |
getUpdateMetadata(updateState?) |
Promise<LocalPackage | null> |
Metadata of the installed update in the given state (RUNNING by default). |
getCurrentPackage() |
Promise<LocalPackage | null> |
The latest installed update, running or pending. |
notifyAppReady() |
Promise |
Confirm the running update so the device does not roll it back. sync() calls it for you. |
restartApp(onlyIfUpdateIsPending?) |
Restart the app, optionally only when an update waits for a restart. | |
disallowRestart() / allowRestart() |
Block restarts during critical flows, then allow them again. A restart requested while blocked runs when allowed. | |
clearUpdates() |
Remove all installed updates and go back to the binary’s bundle. For local development, not production. | |
getConfiguration() |
Promise |
The native configuration the SDK resolved (deployment key, server URL). |
The manual flow with checkForUpdate() gives you a RemotePackage; call remotePackage.download(progressCallback?) to get a LocalPackage, then localPackage.install(installMode, minimumBackgroundDuration?). Field lists for both are in SDK objects and enums.