Getting Started with Cordova Updater
Copy a setup prompt with the install steps and the full markdown guide for this plugin.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/cordova-updater`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/cordova-updater/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
This guide walks you through adding @capgo/cordova-updater to a Cordova app so you can receive Capgo live updates on iOS and Android.
Prerequisites
Section titled “Prerequisites”- Cordova CLI 12+
- Cordova Android 13+ and/or Cordova iOS 7+
- A Capgo account (capgo.app/register)
Installation
Section titled “Installation”-
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 -
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 -
Prepare native projects after changing plugin variables:
Terminal window cordova prepare android ios
JavaScript usage
Section titled “JavaScript usage”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 } };Platform notes
Section titled “Platform notes”- Requires Cordova Android 13+ so the WebView is served from the default
https://localhost/scheme. - The plugin registers a
CordovaPluginPathHandlerto serve downloaded bundle assets.
- Requires Cordova iOS 7+ with the default
app://localhost/scheme. - The plugin implements
CDVPluginSchemeHandlerto intercept bundle requests.
Upload your first bundle
Section titled “Upload your first bundle”Build your web assets, then upload with the Capgo CLI (same workflow as Capacitor):
bun run buildbunx @capgo/cli@latest bundle upload --channel=productionNext steps
Section titled “Next steps”- Compare settings with the Capacitor updater configuration — most options map to
plugin.xmlvariables. - 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.