惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
P
Palo Alto Networks Blog
S
Secure Thoughts
V2EX - 技术
V2EX - 技术
Vercel News
Vercel News
人人都是产品经理
人人都是产品经理
S
SegmentFault 最新的问题
F
Full Disclosure
WordPress大学
WordPress大学
Martin Fowler
Martin Fowler
B
Blog RSS Feed
I
InfoQ
博客园 - 叶小钗
Google Online Security Blog
Google Online Security Blog
L
LangChain Blog
M
MIT News - Artificial intelligence
T
Troy Hunt's Blog
L
LINUX DO - 最新话题
Webroot Blog
Webroot Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
小众软件
小众软件
Microsoft Azure Blog
Microsoft Azure Blog
SecWiki News
SecWiki News
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
P
Proofpoint News Feed
Schneier on Security
Schneier on Security
罗磊的独立博客
T
The Exploit Database - CXSecurity.com
T
The Blog of Author Tim Ferriss
Hacker News: Ask HN
Hacker News: Ask HN
Hacker News - Newest:
Hacker News - Newest: "LLM"
P
Privacy & Cybersecurity Law Blog
Forbes - Security
Forbes - Security
博客园 - 三生石上(FineUI控件)
Application and Cybersecurity Blog
Application and Cybersecurity Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
W
WeLiveSecurity
Security Archives - TechRepublic
Security Archives - TechRepublic
L
LINUX DO - 热门话题
Cyberwarzone
Cyberwarzone
Scott Helme
Scott Helme
T
Tor Project blog
Help Net Security
Help Net Security
I
Intezer
T
Tenable Blog
博客园 - 司徒正美
AI
AI
博客园 - Franky
云风的 BLOG
云风的 BLOG
H
Heimdal Security Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Capacitor Live Updates: A Complete Guide to OTA Updates
Robin · 2026-05-17 · via DEV Community

Shipping a fix used to mean a bundled binary, an app store review, and a few days of hoping users would tap "update". With Capacitor Live Updates that loop shrinks to minutes. You push a new web bundle, devices pick it up on the next launch, and the next version of your app is already in users' hands.

This is the long version of how that works. We'll walk through what live updates actually are, the three choices every team has to make when setting them up, the security model, the production patterns that keep you out of trouble, and a real-world end-to-end example.

Cross-posted from the Capawesome docs blog.

What Are Live Updates?

A Capacitor app has two layers. The native layer is the compiled binary installed from the App Store or Google Play — the WebView, the native plugins, and the platform glue. The web layer is everything inside that WebView: your HTML, CSS, JavaScript, and static assets.

Capacitor App Layers

A live update is an Over-the-Air (OTA) update of the web layer only. The native binary stays untouched. Instead of pushing a new build to the stores, you upload a new web bundle to a delivery service, and the Live Update plugin downloads it, swaps it in, and reloads.

The constraint is also the feature: because nothing native changes, you don't need an app store review and you don't need users to take any action.

Why teams use them

  • Hotfixes in minutes, not days. A critical bug — broken login, wrong API URL, regression in checkout — can be patched before most users notice.
  • Faster feature iteration. Ship small improvements as soon as they're ready instead of batching them into a monthly native release.
  • Staged rollouts and A/B testing. Roll a new bundle out to 5% of users, watch the dashboards, then expand.
  • Smaller user friction. Users don't have to manually tap "update" in the store.

Binary-Compatible vs. Non-Binary-Compatible Changes

The single most important rule: you can only update what already exists in the native binary. Changes that don't touch native code are binary-compatible. Anything else needs a real app store release.

Change Binary-compatible?
HTML, CSS, JavaScript Yes
Images, fonts, JSON, web-only assets Yes
Web framework upgrade Yes
Plugin added/removed or major version bump No
Native code (Java/Kotlin/Swift/Objective-C) No
AndroidManifest.xml, Info.plist, entitlements No
App icon, splash screen No

A useful mental model: if your change only modifies files inside your web project — your src/, your build output — and doesn't add, remove, or upgrade a Capacitor plugin or any native code or config, it's binary-compatible.

App Store Compliance

Both Apple and Google explicitly allow downloading and executing code inside a WebView. Apple's App Store Review Guidelines (3.3.2) allow interpreted code as long as it doesn't change the primary purpose of the app, doesn't create a storefront for other code, and doesn't bypass the system's signing or sandbox. Google Play carves out an explicit exception for "code that is interpreted in a virtual machine or runtime (like JavaScript in a webview or browser)."

In short: app stores draw the line at native self-modification. Live updates only touch the web layer, so they stay safely on the right side of that line.

Wiring It Up

npm install @capawesome/capacitor-live-update
npx cap sync

Enter fullscreen mode Exit fullscreen mode

Create an app in Capawesome Cloud (the CLI prints the app ID):

npx @capawesome/cli apps:create

Enter fullscreen mode Exit fullscreen mode

Then add the plugin to your Capacitor config:

const config: CapacitorConfig = {
  plugins: {
    LiveUpdate: {
      appId: '00000000-0000-0000-0000-000000000000',
      autoUpdateStrategy: 'background',
      autoBlockRolledBackBundles: true,
      readyTimeout: 10000
    }
  }
};

Enter fullscreen mode Exit fullscreen mode

For full setup instructions, see the Live Updates setup guide.

Three Choices to Make

Decision 1: Update Strategy

The strategy decides when an update is downloaded, when it's applied, and whether the user is involved. It's as much a UX decision as a technical one.

Strategy User-visible delay Use case
Background Next cold start Silent updates between sessions
Always Latest (recommended) One prompt after download User informed and chooses when to apply
Force Update Blocks app start Apps where stale code is genuinely unsafe
Instant Fires on push Critical hotfixes for a live incident

Background is the simplest — set it once in your config and the plugin checks on app start, downloads in the background, and applies on the next cold start. The tradeoff is invisibility: users won't know a new version exists.

Always Latest (our recommendation) is background plus a prompt. You listen for nextBundleSet and ask the user to apply the update once it's already downloaded:

import { LiveUpdate } from '@capawesome/capacitor-live-update';

LiveUpdate.addListener('nextBundleSet', async ({ bundleId }) => {
  if (!bundleId) return;
  const shouldReload = confirm('A new version is available. Install it now?');
  if (shouldReload) {
    await LiveUpdate.reload();
  }
});

Enter fullscreen mode Exit fullscreen mode

The download happens in the background, so there's no waiting on the network when the user taps "install".

Force Update keeps the splash screen visible while the app syncs at startup — guarantees freshness, costs UX on slow connections. Instant uses a silent push notification to tell devices to sync immediately — meant for critical hotfixes, not everyday flows.

Decision 2: Versioning Strategy

This is the decision that prevents the most common production failure: shipping a web bundle that doesn't match the installed native binary.

Picture a user with version 5 of your native app. You ship a new web bundle that calls a method on a plugin you only added in version 6. If that bundle reaches the v5 user, their app crashes on launch.

You prevent this by binding each web bundle to the range of native versions it's compatible with. Two approaches:

  • Versioned bundles — attach min/max version ranges on each upload. Simple but error-prone.
  • Versioned channels (recommended) — one channel per native version (e.g. production-10, production-11).

The cleanest way to wire versioned channels is at build time, in the native config:

// android/app/build.gradle
android {
    defaultConfig {
        versionCode 60003
        resValue "string", "capawesome_live_update_default_channel",
                 "production-" + defaultConfig.versionCode
    }
}

Enter fullscreen mode Exit fullscreen mode


CapawesomeLiveUpdateDefaultChannel
production-$(CURRENT_PROJECT_VERSION)

Enter fullscreen mode Exit fullscreen mode

Every native release ships pinned to its own channel. Bumping the native version automatically opens a new channel for compatible web bundles. No JavaScript-side state to manage.

The real win is safety. Every deployment is addressed to a specific native version by name, so it's much harder to accidentally ship a bundle to a binary that can't run it.

Decision 3: Update Delivery Method

How is the bundle packaged for transport?

  • Zip (recommended) — the whole web folder is compressed into one .zip. Compression typically halves the size; the download is a single HTTP request; it works regardless of how your build tool names files.
  • Manifest (delta) — each file is uploaded individually, and the device only downloads changed files based on hashes.

In theory delta is great. In practice, modern bundlers (Vite, Angular CLI, Webpack 5+, Nuxt) all use content-hashed filenames like chunk-3a7f2b.js. Filenames change whenever content changes, which defeats delta comparison: every file looks new, so every file gets downloaded, and you lose the single-zip compression on top.

One team we know had a 20 MB bundle on manifest and 9 MB on zip for the exact same web output. Start with zip — only consider manifest if you have specific stable-named large static assets.

Security: Code Signing

Live updates run on the same trust model as your native binary: whatever code you ship will execute in your app's context. If someone can replace a bundle in transit, they get code execution inside your app. Even though the Cloud uses HTTPS, defense in depth matters.

Code signing closes the gap with two guarantees:

  • Authenticity — the bundle was produced by someone holding your signing key.
  • Integrity — the bundle wasn't modified between upload and install.

The mechanism is a standard RSA keypair. The private key signs each bundle on upload; the public key is embedded in your app config and used to verify every downloaded bundle before it's applied.

# Generate keypair
npx @capawesome/cli apps:liveupdates:generatesigningkey

# Sign every upload
npx @capawesome/cli apps:liveupdates:upload --private-key private.pem

Enter fullscreen mode Exit fullscreen mode

Paste the public key into your Capacitor config and your app will refuse to apply anything not signed by your private key. We strongly recommend enabling this in production.

Best Practices

Automatic Rollbacks

The single most important safety net. Tell the plugin to roll back to the previous bundle if the new one fails to start, and not to retry a bundle that's already failed:

{
  "plugins": {
    "LiveUpdate": {
      "readyTimeout": 10000,
      "autoBlockRolledBackBundles": true
    }
  }
}

Enter fullscreen mode Exit fullscreen mode

If your app doesn't call LiveUpdate.ready() within readyTimeout milliseconds of starting, the plugin reverts to the previous bundle on the next launch. Call ready() as early as you can — in your root component's initialization, before anything else can fail.

Bundle Size Optimization

Three optimizations cover most of the wins:

  1. Drop source maps. Often 75% of bundle size. Set build.sourcemap: false in Vite, --source-map=false in Angular. Upload to Sentry separately if needed.
  2. Stick with zip. Unless you have evidence delta will work, zip is smaller in practice.
  3. Move heavy static assets out of the bundle. Hero images, marketing media — host on a CDN and load on demand.

Reasonable Update Checks

Don't poll:

// Don't do this.
setInterval(() => {
  LiveUpdate.sync();
}, 60_000);

Enter fullscreen mode Exit fullscreen mode

autoUpdateStrategy: 'background' already does the right thing — it checks on app start and on resume with a 15-minute minimum between checks. If you genuinely need a faster update path, use Instant with a silent push.

Gradual Rollouts

You don't have to release to 100% of users at once:

npx @capawesome/cli apps:liveupdates:upload --rollout-percentage 10

Enter fullscreen mode Exit fullscreen mode

That bundle reaches 10% of devices. Watch your error tracking, your crash dashboards, and bump it up when things look good.

A Real-World Example

A real Capacitor app shipping to thousands of users — the DHBW VS app — runs the full recommended stack: Always Latest + versioned channels via native config + zip delivery + automatic rollback + code signing.

The version-sync part is handled by commit-and-tag-version (bumps package.json from conventional commits) and Capver (mirrors that version into Android and iOS). A release tagged 6.0.3 becomes Android versionCode 60003 and iOS CURRENT_PROJECT_VERSION 60003 — three two-digit groups for major/minor/patch. That deterministic mapping is what makes build-time channel pinning work without manual bookkeeping.

At startup, the root component calls ready() and registers the nextBundleSet listener:

private initializeLiveUpdate(): void {
  if (!Capacitor.isNativePlatform()) {
    return;
  }
  void LiveUpdate.ready();
  LiveUpdate.addListener('nextBundleSet', async event => {
    if (!event.bundleId) return;
    const confirmed = confirm('A new version is available. Install it now?');
    if (confirmed) {
      await LiveUpdate.reload();
    }
  });
}

Enter fullscreen mode Exit fullscreen mode

The GitHub Actions workflow takes a channel name as input and runs two CLI commands: create the channel (idempotent with --ignore-errors) and build/deploy the web bundle in the cloud. To deploy a live update for native version 60003, the team triggers the workflow with production-60003 as the channel. Devices on that native version pick it up on their next launch.

Wrapping Up

Live updates are the difference between releasing fixes in minutes and releasing them in days. The recommended path is the same for almost every team:

  • Always Latest strategy so users are informed when an update is ready
  • Versioned channels configured natively so version compatibility is automatic
  • Zip delivery for predictable bundle sizes
  • Automatic rollback so a broken bundle is self-healing
  • Code signing when you ship to production

Everything else — rollouts, force updates, push-driven hotfixes, self-hosting — sits on top of that core.

For the full version with more depth on every section, see the original post on the Capawesome docs blog.

Questions or feedback? Drop into the Capawesome Discord or hit me up in the comments.