Skip to content

Getting Started with Cordova Updater

GitHub

This guide walks you through adding @capgo/cordova-updater to a Cordova app so you can receive Capgo live updates on iOS and Android.

  • Cordova CLI 12+
  • Cordova Android 13+ and/or Cordova iOS 7+
  • A Capgo account (capgo.app/register)
  1. Install the plugin from npm and pass your Capgo app ID:

    Terminal window
    cordova plugin add @capgo/cordova-updater --variable APP_ID=YOUR_CAPGO_APP_ID
  2. Optional: override defaults at install time (same variables as the Capacitor updater):

    Terminal window
    cordova plugin add @capgo/cordova-updater \
    --variable APP_ID=YOUR_CAPGO_APP_ID \
    --variable DEFAULT_CHANNEL=production \
    --variable UPDATE_URL=https://plugin.capgo.app/updates \
    --variable AUTO_UPDATE=atBackground
  3. Prepare native projects after changing plugin variables:

    Terminal window
    cordova prepare android ios

After deviceready, the plugin is available as cordova.plugins.Updater:

document.addEventListener('deviceready', async () => {
const { Updater } = cordova.plugins;
await Updater.notifyAppReady();
const latest = await Updater.getLatest();
if (latest.url && !latest.error) {
const bundle = await Updater.download({
url: latest.url,
version: latest.version,
checksum: latest.checksum,
});
await Updater.next({ id: bundle.id });
}
});

TypeScript types ship with the npm package:

import type { UpdaterPlugin } from '@capgo/cordova-updater';
declare const cordova: { plugins: { Updater: UpdaterPlugin } };
  • Requires Cordova Android 13+ so the WebView is served from the default https://localhost/ scheme.
  • The plugin registers a CordovaPluginPathHandler to serve downloaded bundle assets.

Build your web assets, then upload with the Capgo CLI (same workflow as Capacitor):

Terminal window
bun run build
bunx @capgo/cli@latest bundle upload --channel=production
  • Compare settings with the Capacitor updater configuration — most options map to plugin.xml variables.
  • Read Live update compatibility before shipping native plugin changes.
  • Migrating to Capacitor later? Keep the same Capgo app ID and channels; only the client plugin package changes.