Setup

This is the most simple, default hosted setup path.

1. Create your app in the dashboard

Sign in to the OtaKit dashboard, create an app, and copy its OtaKit appId.

2. Install the Capacitor plugin

npm install @otakit/capacitor-updater
npx cap sync

3. Configure the plugin

Add the OtaKit plugin to capacitor.config.ts and paste in the appId from the dashboard.

// capacitor.config.ts
import type { CapacitorConfig } from "@capacitor/cli";

const config: CapacitorConfig = {
  appId: "com.example.myapp",
  appName: "My App",
  webDir: "out",
  plugins: {
    OtaKit: {
      appId: "YOUR_OTAKIT_APP_ID",
    }
  }
};

export default config;

Note: Your app must be published to the app store at least once with the OtaKit plugin configured before it can receive updates!

Optional: if you want something other than the hosted defaults, you can also set launchPolicy, resumePolicy, runtimePolicy, and checkInterval. See the Plugin API page for the full configuration surface.

4. Add notifyAppReady()

Call notifyAppReady() once your app has loaded. If the new bundle is activated and your app never confirms that it started successfully, OtaKit rolls back automatically.

import { OtaKit } from "@otakit/capacitor-updater";

await OtaKit.notifyAppReady();

For React-style apps, wrap it in a client-side effect:

"use client";
import { useEffect } from "react";
import { Capacitor } from "@capacitor/core";
import { OtaKit } from "@otakit/capacitor-updater";

export function AppReadyProvider() {
  useEffect(() => {
    if (Capacitor.isNativePlatform()) {
      OtaKit.notifyAppReady();
    }
  }, []);

  return null;
}

5. Install the CLI and sign in

npm install -g @otakit/cli
otakit login

6. Build and release

npm run build
otakit upload --release

That publishes the bundle to the base channel. By default, OtaKit downloads it in the background and activates it on the next cold app launch.

Next