Capacitor
The HotCodePush Capacitor SDK, @hotcodepush/capacitor-live-updates, with the one-command setup, the first call and its reference pages.
@hotcodepush/capacitor-live-updates delivers live updates to a Capacitor app. It checks the app's channel for a new release, downloads it in the background and applies it at the next start. When the app does not come up on it, the SDK rolls back on its own. The short version is the site's Capacitor live updates page.
It supports Capacitor 8 and 7 on iOS 15 and Android 6.0 (API 23) and later. The policy is on Supported versions.
Set up in one command
Let your coding agent do it: install the HotCodePush skills and paste the prompt on Installation. Agent skills explains what the agent does.
npx skills add hotcodepush-team/skillsOr run the CLI yourself. init installs the package, writes hotcodepush.json, wires the build step in both native projects and signs you in:
npx hotcodepush initUse it
import { HotCodePush } from '@hotcodepush/capacitor-live-updates';
const result = await HotCodePush.sync();
console.log(result.status);sync() runs one cycle, check, download and apply, and resolves a typed result. With the defaults the SDK runs the same cycle on its own at every start.
Reference
- Installation has the AI prompt,
initand the setup by hand, step by step. - Configuration lists every
hotcodepush.jsonoption with its type and default. - API documents every method, event and type, with the statuses a result carries.
- Source on GitHub is the SDK's repository, MIT, where an issue goes.
On the device
The native layer picks the bundle before the WebView loads, so a start never waits on JavaScript. Applying an update reloads the WebView inside the running process: the page's in-memory state is gone, which setRestartAllowed() and applyStrategy: manual are for. A release that does not come up is rolled back at the next start (Readiness).
Downloaded bundles stay out of iCloud and Android backups, while the device id stays in. location.reload() and live reload apply nothing. How an update reaches a device is the lifecycle.
Last updated on