SDK API Reference
Public functions, client methods, enums, and callbacks.
Setup functions
This reference is for @nitropush/react-native (including Expo).
The NativeScript API has fewer methods and supports only
ON_NEXT_RESTART; do not copy RN-only methods or install modes into NativeScript.
| API | Description |
|---|---|
configure() | Create the hosted NitroPush client from native configuration |
configureWith(config) | Create a client for self-hosted or custom endpoints |
sync(client, options?, onStatus?, onProgress?) | Check, download, and install an update |
Client methods
| Method | Description |
|---|---|
notifyAppReady() | Mark the active bundle healthy |
restartApp(onlyIfPending) | Reload the JavaScript engine |
checkForUpdate(keyOverride?) | Return an eligible remote package or null |
getCurrentPackage() | Read active bundle metadata |
getUpdateMetadataSync() | Read active metadata synchronously |
getPendingPackage() | Read the downloaded, not-yet-active package |
clearUpdates() | Remove OTA state and return to the binary bundle |
InstallMode
IMMEDIATE, ON_NEXT_RESTART, ON_NEXT_RESUME, and ON_NEXT_SUSPEND.
SyncStatus
CHECKING_FOR_UPDATE, AWAITING_USER_ACTION, DOWNLOADING_PACKAGE, INSTALLING_UPDATE, UP_TO_DATE, UPDATE_INSTALLED, UPDATE_IGNORED, UNKNOWN_ERROR, and SYNC_IN_PROGRESS.