Configure the SDK

Initialize FireOTA once, as early as possible in your JavaScript entry point.

Call configure()

js
// index.js — before AppRegistry.registerComponent
import FireOTA from "@fireota/react-native";

FireOTA.configure({
  appId: "YOUR_APP_ID",                // Applications -> your app -> App ID
  serverUrl: "https://ota.example.com", // your FireOTA URL
  runtimeVersion: "1.3.0",             // must match this store build
  channel: __DEV__ ? "development" : "production",
  checkOnAppStart: true,               // check + download in the background on launch
  installMode: "nextRestart",          // normal updates apply on the next cold start
  mandatoryInstallMode: "immediate",   // mandatory updates restart the app right away
});

Launch confirmation

Important: Call configure() early and unconditionally. Reaching it is how a new bundle proves it starts; a bundle that never reaches it is rolled back on the next launch.

Options

  • appId, serverUrl, runtimeVersion — required.
  • channel — default production.
  • checkOnAppStart — default true; set false and call FireOTA.sync() yourself to control timing.
  • installMode / mandatoryInstallMode — nextRestart or immediate.
  • onStatusChange(status, detail) — show progress or errors in your UI.