⚡️ A simple Apache Cordova app that demonstrates the Cordova Live Update plugin.
It ships with a pre-configured Capawesome Cloud app, so live updates work out of the box — no account or setup required. Just install the app and try it.
- 📦 Over-the-air updates — ship new web bundles without an app store release.
- 🏷️ Visible version badge — a large
v1/v2badge makes each update obvious on screen. - 🔀 Channel switching — move the device between live update channels at runtime.
- ↩️ Automatic rollback — a faulty bundle is reverted to the last working one.
- 🪶 No build step — plain HTML / CSS / JavaScript served straight from
www/.
- Apache Cordova — Android + iOS
- Ionic Core (web components, loaded from CDN) — UI, no frontend framework
@capawesome/cordova-live-update— the live update plugin- Plain HTML / CSS / JavaScript — no bundler
- Node.js
- Android: Android Studio
- iOS: Xcode
git clone https://github.com/capawesome-team/cordova-live-update-demo.git
cd cordova-live-update-demo
npm install
npx cordova platform add ios android# Android
npx cordova run android
# iOS
npx cordova run iosThe app is already wired to a live Capawesome Cloud app, so it receives updates automatically — no extra configuration needed.
The screen shows a large bundle badge (v1) and a status card with the current bundle ID, channel, device ID, and last sync time. When a newer bundle is published to the cloud, the app detects it on resume and offers to reload — and the badge changes to reflect the new bundle.
You don't need to publish anything to see this work. Every push to main automatically publishes a fresh bundle (see Continuous Integration), so there is normally an update waiting for you out of the box — just run the app and try it:
- Run the app on a device or simulator — the badge shows
v1. - Send the app to the background, then reopen it. It detects the update and asks to reload.
- Accept — the badge now shows
v2. 🎉
Use Switch channel to move the device between channels, and Reset to built-in bundle to roll back to the bundle that shipped inside the app.
The app uses a pre-configured demo cloud app out of the box. To publish your own bundles instead:
- Create an app in the Capawesome Cloud Console.
- Replace the
APP_IDvariable undercordova.pluginsinpackage.jsonwith your app ID. - Re-apply the plugin:
npx cordova prepare.
Two GitHub Actions workflows are included:
-
live-update.yml— bumps the badge tov2and uploads thewww/bundle to Capawesome Cloud with the Capawesome CLI:npx @capawesome/cli apps:liveupdates:upload --app-id <APP_ID> --path www --channel default --yes
Runs on every push to
main(ignoring Markdown-only changes), weekly on a schedule (so there is always a fresh, non-expired bundle waiting), and on manual dispatch. Requires theCAPAWESOME_CLOUD_TOKENsecret. -
native-build.yml— builds native Android and iOS apps in the cloud via Capawesome Cloud Native Builds. Requires theCAPAWESOME_CLOUD_TOKENsecret.
LiveUpdate.ready()— call once on startup so a faulty bundle can be rolled back automatically if you never reach it.sync()/reload()/reset()— check for a new bundle, apply it, or roll back to the built-in one.- Channels — route bundles to different audiences (e.g.
default,beta). This demo uses thedefaultchannel.
See the plugin documentation for the full API.
Released under the MIT License.
