Native app OTA updates: first launch and stale devices (research + prototype)

Concept inventory · route / · 6 scenarios

Native app OTA updates: why new users run old code, and how to fix it

Research and prototype, 1 Dec 2026. Sources: PostHog production data, the Capgo bundle list, the production bundle file, the app code on main, the Capgo plugin source (8.43.10), a local prototype server, an Android emulator and an iPhone simulator. Nothing was deployed and no production system was changed. This page is for team discussion. No decision is made here.

Short on time? Scroll to the six pictures at the bottom of this page. They show the first launch today and with delta on a phone, the download times, what a new install downloads, the stale-device problem, and the production data.

Human-friendly overview

The iPhone and Android apps get new code in two ways: a store release (slow, needs Apple and Google review) or an over-the-air (OTA) update through Capgo (fast, we publish one on every production deploy). A new user always starts on the code inside the store build. On the first launch we try to download the newest OTA bundle within 5 seconds. If it takes longer, the user continues on the old code.

Today most iPhone users do not get the new bundle in time. They sign up on old code and miss new screens. SOR-11635 is one example: the new "finish on a computer" signup screen did not show for 3 of 5 app signups.

There is a second problem. A downloaded bundle is not applied when the app is opened again. So some users stay on old code for a day or more, even after several opens.

The prototype shows that both problems can be fixed with the Capgo plugin we already use. Two changes do most of the work: delta updates (download only the files that changed) and applying a waiting update at app open. On the iPhone simulator, at the median iPhone network speed, the first download went from 9.8 seconds (timed out, old code) to 2.7 seconds (new code before any content). We also found 4 blockers that must be fixed first.

Key numbers

WhatTodayWith delta + apply at open
First-launch download size15.5 MB zip2.0 MB (only changed files, compressed)
iPhone first launch, median network (simulator)9.8 s, timed out2.7 s, new code before content
iPhone first launch, 90% network (simulator)18.3 s, timed out4.0 s, new code before content
Device with a downloaded update, app opened againStays on old codeSwitches before content, about 0.2 s extra
iPhone first launches that time out (PostHog)76%not measured in production yet

1. The case that started this (SOR-11635)

2. How it works today

First launch of a fresh install (useOtaUpdate.ts):

Every later launch:

When does a queued bundle actually apply? (Capgo plugin source, confirmed on the emulator and the simulator)

History. SOR-9369 added the splash gate because new users saw old code and errors from removed APIs. SOR-9418 fixed a launch that could wait forever. SOR-10193 added the 5 minute delay after the app reloaded on every app switch. SOR-10392 split download and apply after a late download reloaded the app in the middle of signup. SOR-10954 stopped returning users from waiting. SOR-10971 added the PostHog events used here. The earlier "loading not smooth" problems were about the wait and the reload, not the download speed.

3. What the production data says

First-launch download time (PostHog ota_check_finished, gate launch; Android since 6 Oct, iPhone since 25 Nov):

PlatformDownloadsMedian90%Done in 5 s10 s15 s
Android1672.6 s11.2 s78%88%94%
iPhone296.4 s14.2 s28%69%90%

App signups on the built-in code (6 Sep to 1 Dec 2026): iPhone 134 of 206 (65%), Android 21 of 88 (24%).

Devices that stay on old code (app opens, last 7 days):

Store versionDevicesOnly seen on built-in3+ opens, never on OTAOn built-in 24 h or more
iPhone 1.2.16764795
iPhone 1.2.15573487
Android 1.2.15332043
Android 1.2.16301112

Bundle size and release rate:

4. How much actually changes between bundles

Built locally from git (578 files, same shape as the production bundle):

FromToChanged filesChanged sizeOver the network (gzip)
Store build 1.2.16 (built-in)Latest production154 of 5786.0 MB1.8 MB
Previous production releaseLatest production131 of 5785.6 MB1.7 MB
Full zip today57825.2 MB15.5 MB

The real CI build differs from the local build because production env values change which code is kept. The difference comes from env, not from random per-build values. Two real CI bundles in a row have not been compared yet.

5. The prototype

6. iPhone simulator results (real Capgo plugin)

First launch, fresh install, 5 second gate, server bundle differs from the built-in code in 158 of 578 files:

NetworkFull zip (today)Delta
No limit3.3 s, switched1.2 s, switched
iPhone median (19.4 Mbps, 60 ms)9.8 s, timed out, old code2.7 s, switched
iPhone 90% (8.7 Mbps, 100 ms)18.3 s, timed out, old code4.0 s, switched

Stale device on iPhone: after an update was downloaded and the app was closed, Capgo loaded the old bundle again on the next open (today's behaviour). With the prototype change, the app switched to the new bundle before content. Extra time: about 0.17 s.

7. Android emulator results (real Capgo plugin)

8. Blockers (must fix before turning on delta, with Capgo cloud or self-hosted)

9. Other risks found

10. Options

OptionWhat it takesFixes first launchFixes stale devicesCostMain risk
A. Keep Capgo cloud, fix our sideBlockers 1-4, delta in CI, apply at open, plugin @lts-v7Yes on iPhoneYesCapgo plan (Solo $14 or Maker $39 per month by bandwidth; delta lowers bandwidth)Plugin upgrade needs a store release
B. Self-host on Worker + R2Everything in A, plus the Worker, CI publish, rollback and channel tools, stats, a hold during store reviewSame as ASame as AR2 storage only (egress is free)We own uptime, rollback and review hold; no Capgo dashboard
C. Switch plugin (Capawesome Live Update)Native migration and a new store buildYesYes, by design$9-29 per month or self-hostMigration work; v7 line is maintenance only
D. Write our own pluginNative code on two platformsIn theoryIn theoryDev timeRollback, integrity and review bugs

The prototype shows that the app-side changes give the big gain. The server choice (A or B) is a separate decision.

A possible order for discussion:

11. Edge cases of the current approach

12. Open questions for the team

13. Not verified yet

Where the material is

The prototype code (Worker, publish script, simulator, throttling proxy, app patch) and the raw logs are not in the repo yet. They can be pushed to a branch for whoever picks this up.

First launch today

iPhone, median network: the 15.5 MB download takes 9.8 s, the 5 s limit ends first, and the user signs up on the old code without the new PRD-142 screen.

?scenario=first-launch-today

desktop
First launch today (desktop)
mobile
First launch today (mobile)

First launch with delta

Same iPhone and network: only 2.0 MB of changed files, done in 2.7 s, and the user starts on the newest code.

?scenario=first-launch-delta

desktop
First launch with delta (desktop)
mobile
First launch with delta (mobile)

Download time: zip vs delta

Measured with the real Capgo plugin on the iPhone simulator at three network speeds.

?scenario=download-time

desktop
Download time: zip vs delta (desktop)
mobile
Download time: zip vs delta (mobile)

What a new install downloads

15.5 MB today vs 2.0 MB with delta; 420 of 578 files are copied from the app itself.

?scenario=what-downloads

desktop
What a new install downloads (desktop)
mobile
What a new install downloads (mobile)

Stale device

Today a downloaded update does not apply when the app is opened again. With apply-at-open it does, in about 0.2 s.

?scenario=stale-device

desktop
Stale device (desktop)
mobile
Stale device (mobile)

Production data (PostHog)

Share of first-launch downloads done within 5, 10 and 15 seconds, iPhone vs Android.

?scenario=production-data

desktop
Production data (PostHog) (desktop)
mobile
Production data (PostHog) (mobile)