Skip to content

App updates

The platform can serve over-the-air updates to phone apps built with Expo. Most releases of such an app change only JavaScript and images. With app updates those releases reach phones without a new store build. The phone app uses the open-source expo-updates library and talks to the platform over the open Expo Updates protocol (version 1), so no hosted Expo service is involved. The platform also hands out the Android binaries of those apps through install links, for people who install outside a store.

Term Meaning
Application The platform application that owns the phone app, named by its code (acme).
App key One phone app of the application (driver-app). An application can have several. The platform keeps no registry of them: the key is a validated name in the address.
Runtime version The native code an update needs, set when the binary is built (1.4.0). An update reaches only binaries of its runtime version.
Channel Set in the binary (production, staging). Phones on a channel get that channel’s updates.
Branch One app key, operating system (android or ios), runtime version and channel. Updates are published to a branch.
Update One expo export of the app for one operating system, published to a branch. An update never changes after it is published.
Binary An Android APK of the phone app, published to a channel as a release or debug variant.
Install link One address per phone app and channel that always offers the newest binaries of that channel.

A phone asks the platform at launch whether its branch has a newer update. If so, it downloads the files it does not already hold, checks the signature, and runs the update on the next start. The newest update of a branch is live.

The platform signs every manifest it sends. The app embeds a certificate and refuses anything the matching private key did not sign. That signature is where an update’s integrity comes from, which is why the update addresses are public. The private key lives in the platform’s secret store (named in FC_APP_UPDATES_SIGNING_KEYS); the certificate is copied into the app when its binary is built. The certificate’s expiry stops every update to binaries that embed it, so plan the next binary before it expires.

An application publishes with fcdev updates publish from its pipeline. The command uploads only the files the platform does not have, then publishes one update per operating system. Each update is live when the command returns.

  • Staged rollout. An update can be published to a share of a branch’s phones (--rollout 10) and raised later with fcdev updates rollout. A phone’s share is fixed for each update, so it does not flap between launches. Only the newest update of a branch can be partial, and a new publish waits until it reaches 100% or is rolled back. Lowering a share does not take the update off phones that already have it.
  • Rollback. A phone only ever moves forward to a newer update, so a rollback publishes again. To go back to the previous update, the platform publishes it as a new update. To go back to the bundle built into the binary, it publishes a signed directive that tells the phone to use that bundle (--to-embedded); a later publish ends it. fcdev updates republish does the same for any earlier update of the branch.
  • Audit. Every publish, rollout change, rollback, binary and install link is in the audit log.

People who install an Android app outside a store get it from an install link. The pipeline publishes each build with fcdev updates binaries publish, which reads the APK (its package, version, runtime version and signing certificate, and the application, app key and channel its update address names) and refuses a file that is not a properly signed APK. It also refuses a release build that is debuggable or signed with the public Android debug keystore. An operator creates the link with fcdev updates links create; the address is shown once. Anyone holding the address can download the builds. Replacing a link stops the old address at once and prints a new one; removing it takes the link away.

The page a person sees offers each build with its version, date and size, the steps to install an APK, and a QR code of the page so someone on a computer can open it on a phone. A link that was replaced or removed shows “This link does not work”. An update is for the binaries of one runtime version, so fcdev updates publish warns when an Android update’s runtime version has no binary on its channel, and --require-binary refuses to publish it.

Action Permission Held by
Read updates, branches, binaries and links platform:app-update:update:view The application’s service account, App Update Administrator, Platform Viewer
Upload files, publish updates and binaries platform:app-update:update:publish The application’s service account, App Update Administrator
Change a rollout, republish, roll back platform:app-update:rollout:manage The application’s service account, App Update Administrator
Create, replace or remove an install link platform:app-update:install-link:manage App Update Administrator only

Every operation also needs an anchor-scope principal with reach to the application. An application’s service account (role platform:application-service) can act on its own application only, so a pipeline publishes with the credentials the application already has. A client-scoped principal is refused whatever its permissions, because an update reaches every client’s phones. A pipeline does not make install links; an operator does.

  • No console page. The console has no page for updates, branches or binaries. Everything goes through fcdev updates ... or the /api/app-updates/* routes.
  • Not configured, not served. Until at least one manifest-signing key is configured (FC_APP_UPDATES_SIGNING_KEYS), the public update routes answer 503 with the code APP_UPDATES_UNCONFIGURED. A request that names an unknown key id is refused with 400. fcdev creates a development key for local work.
  • Whole files only. The platform sends whole files: it never offers binary diffs of a bundle, and it does not compress asset responses.
  • No adoption numbers. The platform does not record which update each phone runs.
  • No retention. Old updates, files and binaries are not pruned, and a binary cannot be removed.
  • One signing key per id. A key id names one private key. Keep old ids in the list while binaries that embed their certificates are in use.

The upload size limits (FC_APP_UPDATES_MAX_FILE_BYTES, 64 MiB; FC_APP_UPDATES_MAX_BINARY_BYTES, 512 MiB), the file store (FC_APP_UPDATES_STORE) and the per-address rate limits are set in the environment variables.