Version Targeting
Deliver only compatible bundles using channels, semver rules, and the metadata strategy.
Copy a setup prompt with the install steps and the full markdown guide for this plugin.
A Capgo live update replaces your app’s JavaScript bundle instantly, but it can’t change the native part of your app — the Capacitor/Cordova plugins, native dependencies, and native project configuration that are compiled into the installed binary. When a new bundle expects native code that the installed binary doesn’t have, the bundle is native-incompatible: Capgo can still deliver it, but it may crash or misbehave on devices that are still running the older native build.
This page explains how Capgo detects native compatibility, what an incompatible update means for your users, and how to ship native changes safely.
Capgo can send files from your generated web build folder. If the change only affects HTML, CSS, JavaScript, assets, or pure-JavaScript packages bundled into that output, ship it as a live update.
Use a native app release when a change updates capacitor.config.ts, plugin configuration stored in Capacitor config, native plugins or dependencies, Capacitor itself, or iOS/Android project files. A practical check: if the change must update the native project through npx cap sync or npx cap copy before installed devices can use it, treat it as native.
| Change | Ship with Capgo OTA? | Why |
|---|---|---|
| HTML, CSS, app JavaScript, images, fonts, and other web build assets | Yes | They are loaded from the web bundle at runtime. |
| Pure-JavaScript package changes bundled into your web output | Yes | The generated JavaScript is part of the web bundle. |
capacitor.config.ts changes | No | Capacitor config is read into the native app at build time. |
| Adding, removing, or upgrading Capacitor/Cordova plugins | No | The installed native binary must contain the matching native code. |
| iOS or Android project file changes | No | Existing users need a new binary from the stores. |
Capgo ships dedicated updater clients for each hybrid runtime:
| Plugin | Use when |
|---|---|
@capgo/capacitor-updater | Capacitor iOS/Android apps |
@capgo/cordova-updater | Cordova iOS 7+ / Android 13+ apps |
@capgo/electron-updater | Electron desktop apps |
Native compatibility checks apply regardless of client plugin — they compare the bundle’s recorded native dependencies against the installed binary.
Every Capacitor app ships in two layers:
A live update swaps only the JavaScript layer. If that new JavaScript calls a native plugin or API that isn’t compiled into the installed binary, the call fails at runtime — which can crash the app or silently break a feature. Put simply: Capgo cannot update native code, so a device running the old native build can’t safely run a bundle that was built against new native code.
When you upload a bundle — or run the check manually — Capgo compares the native packages in your local project (your Capacitor/Cordova plugins and their versions) against the native packages recorded for the bundle currently live on the channel:
bunx @capgo/cli@latest bundle compatibility com.example.app --channel productionThe CLI prints a table of each native package with its local version, the version live on the channel, and a status:
Package Local Remote Status@capacitor/core 6.1.2 6.1.2 ✅@capacitor/share 6.0.0 6.0.0 ✅@capacitor/camera 6.1.0 — ❌ not in the live bundleFor pipelines, bundle releaseType collapses the check into a single word:
bunx @capgo/cli@latest bundle releaseType com.example.app --channel production# → OTA safe to ship as a live update# → native needs a new app-store buildGate your release pipeline on this: ship a live update when it prints OTA, and trigger a native build when it prints native.
On devices still running the older native binary, the missing native code can cause crashes or broken features — even though the update downloaded and applied “successfully.” This is why a live update can be live and delivered yet still break the app for existing users, and why Capgo can warn you when an incompatible bundle goes live.
Capgo’s automatic rollback can catch a JavaScript error thrown before notifyAppReady() runs, but it isn’t a substitute for shipping compatible native code — a mismatch that crashes later, or crashes natively, can slip past it.
When a bundle needs new native code, build and submit a new binary to the App Store / Play Store (or rebuild with Capgo Cloud Build). Once users update the binary, the bundle’s native dependencies line up and the live update runs correctly.
If an incompatible bundle is already active on a channel, revert the channel to the last compatible build to stop serving it until the native build is out. See Rollbacks.
Two complementary guards, both of which actually inspect your native packages:
Fail the upload in CI — --fail-on-incompatible
Add the flag to your bundle upload step. If the bundle’s native packages don’t match the channel’s currently-live version, the upload fails with a non-zero exit and nothing is shipped — so your pipeline stops you from silently publishing an OTA update that can’t take effect until users install a native build:
bunx @capgo/cli@latest bundle upload --channel production --fail-on-incompatibleCompatible uploads — and cases where the check can’t run (a new channel, or no remote metadata) — pass through unchanged. In an interactive terminal it offers the Capgo Builder native-build flow instead; declining fails. (Can’t be combined with --ignore-metadata-check.)
Gate delivery by native version — metadata + --auto-min-update-version
When you do ship the native build and the bundle together, put the channel on the metadata strategy and upload with --auto-min-update-version. Capgo runs the compatibility check on every upload and, when a bundle needs new native code, raises the update floor so devices that haven’t installed the matching native build don’t receive it:
# one-time: switch the channel to the metadata strategybunx @capgo/cli@latest channel set production com.example.app --disable-auto-update metadata
# from then on, Capgo sets the floor automatically on every uploadbunx @capgo/cli@latest bundle upload --channel production --auto-min-update-versionSee Version Targeting for the full set of targeting options.
Version Targeting
Deliver only compatible bundles using channels, semver rules, and the metadata strategy.
Rollbacks
Revert a channel to the last compatible build if an incompatible bundle went live.
Update Types
How apply timing, delay conditions, and version blocking work together.
CLI: bundle
Reference for the bundle compatibility, releaseType, and upload options.
If you are using Native Compatibility to keep live updates safe, connect it with Version Targeting to route bundles by native version, Rollbacks to recover when an incompatible bundle ships, Update Types to understand channel version blocking, and the Capgo CLI bundle reference for the compatibility and releaseType commands.