SDK reference

The JavaScript API of @fireota/react-native.

API

ts
FireOTA.configure(options)        // once, at startup (required)
FireOTA.sync()                    // check + download + install, honouring install modes
FireOTA.checkForUpdate()          // -> { updateAvailable, reason?, release? }
FireOTA.downloadUpdate(release)   // download + SHA-256 verify; the running bundle is untouched
FireOTA.installUpdate(release, "nextRestart" | "immediate")
FireOTA.reload()                  // restart now to apply a pending update
FireOTA.clearPendingUpdate()      // drop a downloaded update that is not applied yet
FireOTA.getCurrentRelease()       // -> { releaseId, pendingReleaseId, installationId }
FireOTA.getUpdateStatus()         // idle | checking | upToDate | downloading | downloaded | installed | error