Self-hosted live updates for Capacitor with Codemagic Patch
说明与用途
Codemagic Patch 让 Capacitor 应用能够快速部署 Web 层更新,替代即将停用的 Appflow 服务,并提供自托管、版本控制的 OTA 方案。
问题
Capacitor apps need fast, store‑independent fixes for web‑layer bugs, but OTA tools are being sunset and existing solutions lack first‑party support.
结果
Teams can ship web‑layer fixes within minutes, control rollout, and maintain native version discipline, avoiding Appflow sunset risks.
工作流
- 1. Self‑host Patch server (Docker Compose with Caddy, PostgreSQL, S3, optional CDN).
- 2. Install @codemagic/capacitor-patch SDK in the app and @codemagic/capacitor-patch-cli.
- 3. Configure CLI with server URL and login.
- 4. Build web assets and publish with
cmpatch-capacitor release createtargeting current native version. - 5. Test on Staging, then promote to Production with staged rollout.
- 6. For native changes, bump native version, rebuild, sign, and publish via Codemagic; future OTA releases target new version.
证据
Codemagic Patch is a new self‑hosted tool to ship live updates of HTML, CSS, and JavaScript to Capacitor, Ionic, and Cordova-on-Capacitor apps, without a new store binary.
Ionic has announced that all Appflow features and services will be sunset on December 31, 2027
Patch v0.6.0 ships with two new packages: @codemagic/capacitor-patch, the SDK that goes into your app, and @codemagic/capacitor-patch-cli, a command line made for publishing and managing Capacitor releases.
The server, release worker, and dashboard run on your infrastructure as a single Docker Compose deployment: Caddy for TLS, the Patch server, PostgreSQL, and S3-compatible object storage, with Cloudflare or CloudFront in front if you want a CDN.
- 记录日期: 2026-11-02T11:43:55.432Z