Channels & update mode

Keep it simple first: use the base stream with updateMode: "next-launch". Add custom channels only when you need separate release tracks such as staging or production.

Simple base stream setup

plugins: {
  OtaKit: {
    appId: "YOUR_OTAKIT_APP_ID"
  }
}

This behaves like a single-track OTA flow. Upload and release to the base stream.

otakit upload --release

Available modes

manual means no automatic startup check. Your app decides when to call OtaKit.getState(), OtaKit.check(), OtaKit.download(), OtaKit.update(), and OtaKit.apply().

next-launch is the default. OtaKit checks automatically, downloads the update, and activates it on the next cold launch.

immediate is the aggressive mode. OtaKit checks automatically and reloads into the new bundle during startup.

Production + staging setup

Use env-driven build config. Production can stay on next-launch for a calmer rollout, while internal QA can use immediate updates during startup.

// capacitor.config.ts
const channel = process.env.OTAKIT_CHANNEL?.trim() || undefined;
const updateMode = (process.env.OTAKIT_UPDATE_MODE ?? "next-launch") as
  | "manual"
  | "next-launch"
  | "immediate";

plugins: {
  OtaKit: {
    appId: process.env.OTAKIT_APP_ID,
    ...(channel ? { channel } : {}),
    updateMode
  }
}
# Production build
export OTAKIT_CHANNEL=production
export OTAKIT_UPDATE_MODE=next-launch

# Internal QA build
export OTAKIT_CHANNEL=staging
export OTAKIT_UPDATE_MODE=immediate

Manual prompt setup

If you want to show your own “Update available” banner or block a screen until users accept the update, use manual mode:

plugins: {
  OtaKit: {
    appId: "YOUR_OTAKIT_APP_ID",
    updateMode: "manual"
  }
}

Then call OtaKit.getState() to see whether a bundle is already staged, OtaKit.check() to inspect availability, and either OtaKit.update() for the easy one-shot flow or OtaKit.download() plus OtaKit.apply() for a split download/apply flow.

Recommended rollout flow

# 1) Upload and validate in staging
otakit upload --release staging

# 2) Release that same bundle to production
otakit release <bundle-id> --channel production

Use the bundle ID returned by upload, or inspect recent bundles with otakit list before promoting.

Runtime channel overrides are intentionally not supported. Channel is a build-time decision. If channel is omitted, the app uses the base stream.