skip to content

Supporting Old App Versions

Installed binaries call the API for years, so changes stay additive, parsers tolerate unknown fields and enum values, and a minimum version is enforced. Interviewers ask how servers ship around them.

on this pageshow

explore

questions

5

Why must a mobile app's backend stay compatible with app builds released years ago, when a website's backend usually need not?

level: juniorimportance: must knowfreq 45%

answer

  1. frozen code on the phone
  2. the user decides when to update
  3. skew of years, not minutes
  4. every supported build is a live client
  5. the server always ships first

basics

~20 s

An installed app build cannot be redeployed: users update late or never, so builds from years ago keep calling the API. The server changes in minutes but adoption takes years, so each change must work for every supported build.

solid answer

~40 s

A website's code is fetched fresh, so a backend change and the page that uses it line up within minutes, apart from tabs left open. An installed app is different: each build is frozen on the phone, the user decides when to update, automatic updates may be off, and some devices can no longer install new builds at all. So in any week the backend serves a spread of builds, this month's and ones from two years ago, and that **version skew** lasts years. The rule that follows is for the server team: a change is safe only if every supported build keeps working. Evolution stays additive, old fields and endpoints stay until the oldest build that uses them is retired, and a **minimum supported version** is how that retirement is enforced.

go deeper

for a junior

Remember the core fact: an installed build cannot be redeployed, so builds from years ago keep calling the server, and the server must keep working for them.

for a middle

Explain where version skew comes from: user-controlled updates, devices that cannot install new builds, rarely opened apps, and why the server always ships its support first.

for a senior

Show you treat every supported build as a live client: test server changes against the oldest allowed build, and count traffic by build to see the tail.

for a principal

Frame the support window as a business cost: every extra year of old builds is compatibility code to carry, weighed against the riders a minimum-version block would turn away.

## What version skew means for an installed app **Version skew** is the gap between the contract a server speaks and the contract its clients were built against. Every client-server system has some. What makes an installed mobile app special is how long the skew lasts and who controls it. A website ships its client code on every page load. When the team deploys a new backend and a new frontend, the only old clients left are browser tabs opened before the deploy, and they disappear within hours. An installed app ships its client code once, inside a binary that sits on the phone until the user replaces it. The team that owns the backend does not own that moment. ## Why the next release cannot fix it A breaking server change cannot be repaired by shipping a corrected app, because the corrected app reaches each phone only when that phone updates. Several things keep old builds alive: - **The user decides.** Automatic updates can be switched off, and many people install an update only when prompted, or never. - **Old devices stop being able to install new builds.** When a release raises the oldest operating-system version it supports, phones below that line keep the last build they could install. - **Rarely opened apps stay old.** A rider who books a ride twice a year may open a build that is eighteen months old. - **A store review sits between a fix and the store**, and after that the rollout itself takes time to reach every phone. - **A shipped binary cannot be recalled.** There is no way to replace the code on a phone from the server side. So the fix for a server change that breaks old builds is on the server: revert or adapt the change. The next app release helps only the users who install it. ## The web comparison | | Website | Installed mobile app | |---|---|---| | Where the client code lives | Fetched from the server on each load | Frozen inside a build on the phone | | How fast a change reaches users | Minutes to hours | Weeks for most users, years for the tail | | Who decides when the client changes | The team that deploys | Each user, one phone at a time | | How long old clients keep calling | Until open tabs close | Until the build is retired by a minimum version, or the phone goes | | Can a bad client be rolled back | Redeploy the previous version | No; only a new release that users must install | ## What the server team must do about it 1. **Treat every supported build as a live client.** A server change is tested against the oldest build still allowed in, not only the newest. 2. **Evolve additively.** Add fields, values and endpoints; do not rename, retype or remove what a supported build still reads. 3. **Ship server support first.** A new build is released only once the server already serves what it calls, because the server cannot wait for adoption. 4. **Know the install base by version.** The app sends its build version with each request, so the server can count traffic per build and see the long tail. 5. **Hold a lever for the tail.** A **minimum supported version** lets the server stop serving builds below a line, so the support window ends somewhere. The client carries part of the bargain too: its parser ignores fields it does not know and maps unknown enumerated values to an explicit unknown case, so additive server changes do not crash it. ## A ride-hailing example Take a rider app whose server team wants to add a ride category, rename a fare field and retire an endpoint. In this scenario, about 6% of ride requests come from builds more than eighteen months old. Each of the three changes is now a question about those builds: - The new category must not crash or confuse a build that has never heard of it. - The renamed fare field must keep its old name populated while any supported build reads it. - The endpoint can be switched off only after the builds that call it are below the minimum supported version. None of this is needed for the browser version of the same product, where the next deploy replaces the client for everyone. ## Common misreadings - "We'll fix it in the next release" fixes nothing for the riders who do not install it. - "Everyone updates within a week" confuses the head of the adoption curve with all of it. - "Force an update" is a real lever, but a block screen cannot install anything: the user must still update, on a device that can take the new build, while online. It is a decision with a cost, not a replacement for compatibility.

  • Why not just force every user onto the latest build?
    A hard minimum-version gate can stop an old build from working, but it cannot install the update. The user must still update, own a device the new build supports, and be online. Every block turns some riders away, so a gate is pulled for a reason, such as a security fix or a contract the server can no longer serve, not as a substitute for staying compatible.
  • For an installed app, which ships first: the server change or the app release that uses it?
    The server, always. A new build calls the new field or endpoint the moment it is installed, so that support must already be live; and the server cannot wait for adoption, because old builds keep calling for years. So a server change is checked against every supported build, and a release goes out only once the server already speaks its contract.

A tax office redesigns its paper form, but millions of the old printed forms are already in people's drawers. The office can print the new one tomorrow; it must still accept the old ones people mail in until it announces a cut-off date and stops taking them.

  • We'll fix the breaking API change by shipping a new app version.
  • Nearly every user updates within a few days of a release.
  • The server only has to match the newest app build's contract.
  • A mobile backend can follow the web app's deploy-ordering rules unchanged.
  • Old builds stop mattering once the store shows the new version.
open as a page

How should a ride-hailing app's server signal a minimum-supported-version gate so that even a badly broken old build still obeys it?

level: middleimportance: must knowfreq 44%

basics

~20 s

The app sends its build version on every request; below a hard floor, any call gets one frozen, distinct block response that the app checks before parsing the body. That contract ships in the first release and never changes.

open as a page

After adding a new fare field beside the old one in a ride-hailing app's API, when may the server stop sending the old field?

level: middleimportance: must knowfreq 42%

basics

~20 s

Only once no supported build reads it: the minimum supported version must sit above the last release whose code reads the old field. Until then the server fills both fields from one source and never changes the old one's meaning.

open as a page

A ride-hailing server adds a ride category that two-year-old rider app builds have never seen; what must those old builds and the server each do?

level: seniorimportance: should knowfreq 36%

basics

~20 s

The old build must map the unknown value to an explicit unknown case and hide or generically show it, never crash or guess. The server must not offer the category to builds that cannot book it, judged by version or declared capability.

open as a page

A ride-hailing server team wants to retire an endpoint that some old rider app builds still call; how do you decide when and how to switch it off?

level: seniorimportance: should knowfreq 30%

basics

~20 s

Measure who still calls it by app build, in riders and rides, then either keep a cheap adapter or raise the hard minimum version above the last calling build. Switch it off only after that floor is in force.

open as a page