Mobile development · Intermediate · 22 min
Ship JavaScript fixes over the air with EAS Update
By Padding · Updated 18 Nov 2026
Expo SDK 58 · expo-updates 58.0 · EAS CLI 27.11 · node:26 (Debian)
You will set up expo-updates in an Expo SDK 58 app with a fingerprint runtime version, signed updates and channels per build profile, prove which changes can ship without a store build, and publish, roll out and roll back an update with EAS CLI 27.
On this page
A store release takes hours to days: a build, a review, then a slow climb as people's phones install the new version. For a wrong phone number on a contact screen, that wait is out of proportion. An Expo app has two layers. One is the native app that the store installs. The other is a JavaScript bundle and its images, which the native app loads when it starts. EAS Update replaces the second layer without touching the first. You publish a new bundle, and the expo-updates library inside the app downloads it and runs it the next time the app starts.
The hard part is not the publish command. It is knowing what an update may change, making sure an update never reaches a build it does not fit, and having a way back when a fix goes wrong. This tutorial builds a one-screen "clinic opening hours" app in ~/ota-demo and works through each of those. Every command up to the publishing step runs on your laptop without an Expo account. Publishing, rollouts and rollbacks need an account and a build on a phone, and come last.
Step 1 · Decide what can ship over the air
Sort every change into one of two groups before you choose how to ship it.
An update can change:
- JavaScript and TypeScript code: screens, logic, copy, styles, API calls
- images, fonts and other assets that your code imports
- configuration that is only read by JavaScript at run time
A change needs a new store build when it touches the native layer:
- adding, removing or upgrading a library with native code (most
expo-*modules, anything that needsnpx expo prebuildto do something) - permissions, the app icon, the splash screen, the bundle identifier or anything else in
app.jsonthat ends up inAndroidManifest.xmlorInfo.plist - an Expo SDK or React Native upgrade
The stores have their own rules on top of the technical ones. Apple's App Store Review Guideline 2.5.2 bars apps from downloading code that "introduces or changes features or functionality", and section 3.3.1(B) of the Apple Developer Program License Agreement allows downloaded interpreted code only when it does not change the app's primary purpose. Google Play's Device and Network Abuse policy forbids apps updating themselves outside Google Play, with an exception for code that runs in an interpreter, which covers a JavaScript bundle. In practice: use updates for bug fixes, copy and small improvements to features that went through review. Ship a new feature, or anything that changes what the app is for, through the store.
Check it worked
Write down the last three changes you made to an app you work on, and mark each one "update" or "build". If one of them added a permission or a native library, it is "build", even if most of the diff was JavaScript.
Step 2 · Create the app and add expo-updates
Create a TypeScript app from the blank template. The @sdk-58 suffix fixes the template to Expo SDK 58:
mkdir -p ~/ota-demo
cd ~/ota-demo
npx create-expo-app@5.0.0 clinic-hours --template blank-typescript@sdk-58Add the updates library with npx expo install, which picks the version that matches your SDK, and install EAS CLI:
cd ~/ota-demo/clinic-hours
npx expo install expo-updates
npm install --global eas-cli@27.11.0Link the project to your Expo account. eas init creates the project on expo.dev and writes its ID to app.json, and eas update:configure adds the update server URL and a runtime version to app.json:
eas login
eas init
eas update:configureCheck it worked
cd ~/ota-demo/clinic-hours
grep '"expo-updates"' package.json
eas --version
node -e "const e=require('./app.json').expo; console.log(e.updates.url, e.extra.eas.projectId)"You see the expo-updates line with a ~58.0 version, eas-cli/27.11.0 followed by your platform and Node version, and a URL of the form https://u.expo.dev/<project-id> followed by the same ID. The ID is not a secret: it is compiled into every build so the app knows where to ask for updates.
Step 3 · Tie updates to a fingerprint runtime version
Every build carries a runtime version, and every update is published for one. A phone only downloads updates whose runtime version matches its build exactly. That is the safety catch: an update that calls a native module the build does not have would crash on launch, so it must never be offered to that build.
The question is who changes the runtime version. With the appVersion policy, it follows version in app.json. That works until someone adds a native library and forgets to bump the version: the new update then reaches old builds that lack the library. The fingerprint policy removes the human step. It hashes everything that can affect the native layer (native dependencies, config plugins, the native parts of app.json) and uses the hash as the runtime version. Any native change produces a new hash, so updates made after it only reach builds made after it.
Switch the policy, and set how the app checks for updates. The script rewrites only these two keys:
cd ~/ota-demo/clinic-hours
node -e "
const fs = require('fs')
const app = JSON.parse(fs.readFileSync('app.json', 'utf8'))
app.expo.runtimeVersion = { policy: 'fingerprint' }
app.expo.updates = { ...app.expo.updates, checkAutomatically: 'ON_LOAD', fallbackToCacheTimeout: 0 }
fs.writeFileSync('app.json', JSON.stringify(app, null, 2) + '\n')
"ON_LOAD checks every time the app starts. fallbackToCacheTimeout: 0 means the app never waits for the network: it starts with the code it already has, downloads any update in the background, and runs it on the next launch. On prepaid mobile data, which is how a lot of people in Nigeria, Kenya and many other markets pay for the internet, an update download costs the user money. WIFI_ONLY checks only on Wi-Fi, which suits apps whose fixes can wait a day.
Check it worked
Ask Expo for the config it resolves, then ask expo-updates for the runtime version a build made now would get:
cd ~/ota-demo/clinic-hours
npx expo config --type public --json | node -e "const c=JSON.parse(require('fs').readFileSync(0,'utf8')); console.log(JSON.stringify(c.runtimeVersion), c.updates.checkAutomatically)"
npx expo-updates runtimeversion:resolve --platform android > ../runtime-1.json
node -e "console.log(require('../runtime-1.json').runtimeVersion)"The first line is {"policy":"fingerprint"} ON_LOAD. The second is a 40-character hexadecimal hash. Keep ../runtime-1.json: the next steps compare against it.
Step 4 · Map channels to build profiles
A channel is a name baked into a build. A branch is a list of updates. EAS points each channel at a branch, so builds made with the preview profile ask the preview channel, which serves the preview branch. You test an update on preview builds, then move it to production. Create eas.json with a channel on each profile:
cd ~/ota-demo/clinic-hours
cat > eas.json <<'JSON'
{
"cli": {
"version": ">= 27.11.0",
"appVersionSource": "remote"
},
"build": {
"preview": {
"distribution": "internal",
"channel": "preview",
"environment": "preview"
},
"production": {
"channel": "production",
"environment": "production",
"autoIncrement": true
}
}
}
JSONMake a preview build for your own phone. This is the build that will receive the first update, and the tutorial on building and submitting with EAS covers it, and the production build, in detail:
eas build --profile preview --platform androidCheck it worked
cd ~/ota-demo/clinic-hours
node -e "const b=require('./eas.json').build; for (const [name, p] of Object.entries(b)) console.log(name, '->', p.channel)"The output is preview -> preview and production -> production. A build profile without a channel gets no updates at all, which is a common reason an update "never arrives".
Step 5 · Show which code the app is running
When you test an update, you need to see on the screen whether the phone runs the build's own code or an update. Put the text you will fix in its own file, so the fix is a one-file change:
cd ~/ota-demo/clinic-hours
cat > release-note.ts <<'TS'
export const OPENING_HOURS = 'Open Monday to Friday, 8:00 to 16:00'
TSReplace App.tsx with a screen that shows the opening hours, the channel, the runtime version and the running update. useUpdates reports whether an update is available or downloaded, and the buttons let a tester apply it straight away instead of waiting for the next launch:
cd ~/ota-demo/clinic-hours
cat > App.tsx <<'TSX'
import { StatusBar } from 'expo-status-bar'
import * as Updates from 'expo-updates'
import { Button, Image, StyleSheet, Text, View } from 'react-native'
import { OPENING_HOURS } from './release-note'
export default function App() {
const { isUpdateAvailable, isUpdatePending, isChecking, isDownloading } = Updates.useUpdates()
return (
<View style={styles.container}>
<Image source={require('./assets/icon.png')} style={styles.logo} />
<Text style={styles.title}>{OPENING_HOURS}</Text>
<Text style={styles.meta}>Channel: {Updates.channel ?? 'none (development)'}</Text>
<Text style={styles.meta}>Runtime: {Updates.runtimeVersion ?? 'unknown'}</Text>
<Text style={styles.meta}>
Running: {Updates.isEmbeddedLaunch ? 'the code inside this build' : `update ${Updates.updateId}`}
</Text>
{isChecking || isDownloading ? <Text style={styles.meta}>Checking for updates…</Text> : null}
{isUpdateAvailable && !isUpdatePending ? (
<Button title="Download the update" onPress={() => Updates.fetchUpdateAsync()} />
) : null}
{isUpdatePending ? (
<Button title="Restart to apply the update" onPress={() => Updates.reloadAsync()} />
) : null}
<StatusBar style="auto" />
</View>
)
}
const styles = StyleSheet.create({
container: { flex: 1, alignItems: 'center', justifyContent: 'center', gap: 8, padding: 24, backgroundColor: '#fff' },
logo: { width: 64, height: 64 },
title: { fontSize: 20, fontWeight: '600', textAlign: 'center' },
meta: { fontSize: 14, color: '#2a2d33' },
})
TSX
npx tsc --noEmitNow build the update itself. eas update runs npx expo export for you, but running it yourself shows exactly what gets uploaded:
cd ~/ota-demo/clinic-hours
npx expo export --platform android --platform ios
cp dist/metadata.json ../metadata-1.jsonCheck it worked
cd ~/ota-demo/clinic-hours
node -e "const m=require('./dist/metadata.json').fileMetadata; for (const p of ['android','ios']) console.log(p, m[p].bundle, m[p].assets.map(a => a.path + '.' + a.ext).join(' '))"
ls dist/_expo/static/js/androidYou see one line per platform: a Hermes bytecode bundle at a path like _expo/static/js/android/index-<hash>.hbc, and the icon as assets/<hash>.png. That is the whole update: one bundle per platform, the assets it imports and metadata.json, which lists them. There is no native code in dist, which is why an update cannot add a native library. File names carry a hash of their contents, so a changed bundle gets a new name.
Step 6 · Prove which changes fit the same build
Make the fix the clinic asked for. Friday closes early:
cd ~/ota-demo/clinic-hours
cat > release-note.ts <<'TS'
export const OPENING_HOURS = 'Open Monday to Thursday, 8:00 to 16:00, and Friday, 8:00 to 13:00'
TS
npx expo export --platform android --platform ios
npx expo-updates runtimeversion:resolve --platform android > ../runtime-2.jsonCompare the runtime versions and the bundle names before and after:
cd ~/ota-demo
node -e "
const r1 = require('./runtime-1.json').runtimeVersion, r2 = require('./runtime-2.json').runtimeVersion
const b1 = require('./metadata-1.json').fileMetadata.android.bundle
const b2 = require('./clinic-hours/dist/metadata.json').fileMetadata.android.bundle
console.log('runtime', r1 === r2 ? 'unchanged' : 'CHANGED')
console.log('bundle ', b1 === b2 ? 'unchanged' : 'changed')
if (r1 !== r2 || b1 === b2) process.exitCode = 1
"The output is runtime unchanged and bundle changed: new code, same native layer, so the update can go to every build made in the previous steps.
Now try a native change. Adding the camera permission edits AndroidManifest.xml, which an update cannot touch. Record the full fingerprint first, then add the permission:
cd ~/ota-demo/clinic-hours
npx expo-updates fingerprint:generate --platform android > ../fingerprint-before.json
node -e "
const fs = require('fs')
const app = JSON.parse(fs.readFileSync('app.json', 'utf8'))
app.expo.android = { ...app.expo.android, permissions: ['android.permission.CAMERA'] }
fs.writeFileSync('app.json', JSON.stringify(app, null, 2) + '\n')
"
npx expo-updates fingerprint:generate --platform android > ../fingerprint-after.json
npx @expo/fingerprint fingerprint:diff ../fingerprint-before.json ../fingerprint-after.json > ../fingerprint-diff.jsonCheck it worked
cd ~/ota-demo
node -e "
const a = require('./fingerprint-before.json').hash, b = require('./fingerprint-after.json').hash
console.log('runtime', a === b ? 'unchanged' : 'changed')
for (const d of require('./fingerprint-diff.json')) console.log(d.op, (d.afterSource || d.beforeSource || d.addedSource || d.removedSource).id || '')
if (a === b) process.exitCode = 1
"The output is runtime changed and a line like changed expoConfig. An update published now would carry the new runtime version, and phones on the old build would never be offered it. That is the outcome you want: the fix waits for the new build instead of crashing old ones. Run fingerprint:diff like this in code review, or in CI before you publish, to catch a pull request that quietly needs a store build.
The clinic app does not need the camera, so take the permission out again. The runtime version goes back to the value in runtime-1.json:
cd ~/ota-demo/clinic-hours
node -e "
const fs = require('fs')
const app = JSON.parse(fs.readFileSync('app.json', 'utf8'))
delete app.expo.android.permissions
fs.writeFileSync('app.json', JSON.stringify(app, null, 2) + '\n')
"
npx expo-updates runtimeversion:resolve --platform android | node -e "const r=JSON.parse(require('fs').readFileSync(0,'utf8')).runtimeVersion; console.log(r === require('../runtime-1.json').runtimeVersion ? 'back to runtime 1' : 'different'); if (r !== require('../runtime-1.json').runtimeVersion) process.exitCode = 1"Step 7 · Sign your updates
Anyone who can publish to your project can change the code on your users' phones. If an Expo access token leaks from a CI job, so does that power. Code signing closes the gap: the build carries a certificate, every update is signed with the matching private key, and the app refuses an update whose signature does not check out. EAS accepts signed updates on the Production and Enterprise plans. You can generate and test the keys on any plan.
The private key must never enter the repository, so generate it into a folder next to the project, not inside it:
cd ~/ota-demo/clinic-hours
npx expo-updates codesigning:generate \
--key-output-directory ../keys \
--certificate-output-directory certs \
--certificate-validity-duration-years 10 \
--certificate-common-name "Clinic Hours Demo"
npx expo-updates codesigning:configure \
--certificate-input-directory certs \
--key-input-directory ../keysReplace "Clinic Hours Demo" with your organisation's name. certs/certificate.pem holds only the public half and is committed with the app. ../keys/private-key.pem is the secret: store it in a password manager, and give it to CI as a secret file, as in keep secrets out of Git. If you lose it, signed builds in the field can no longer receive updates.
Check it worked
cd ~/ota-demo/clinic-hours
ls -l ../keys
node -e "const u=require('./app.json').expo.updates; console.log(u.codeSigningCertificate, JSON.stringify(u.codeSigningMetadata))"
npx expo-updates runtimeversion:resolve --platform android | node -e "const r=JSON.parse(require('fs').readFileSync(0,'utf8')).runtimeVersion; console.log(r === require('../runtime-1.json').runtimeVersion ? 'same runtime' : 'new runtime: make new builds')"private-key.pem is readable only by you (-rw-------), the config line reads ./certs/certificate.pem {"keyid":"main","alg":"rsa-v1_5-sha256"}, and the last line is new runtime: make new builds. The certificate lives in the native layer, so the fingerprint changes, and builds made before this step keep accepting unsigned updates. Make new preview and production builds before you rely on signing.
Step 8 · Publish, roll out and roll back
From here every command talks to EAS and needs your account and the new preview build installed on a phone. Publish the fix to the preview channel. --environment picks the EAS environment variables for the bundle and is required from SDK 55:
cd ~/ota-demo/clinic-hours
eas update --channel preview --environment preview \
--message "Friday closes at 13:00" \
--private-key-path ../keys/private-key.pemOpen the app on the phone, close it fully, and open it again. The first launch downloads the update in the background, and the second runs it. Or tap "Restart to apply the update" when it appears.
When the fix looks right, send the same update to production rather than building a new one, so production gets exactly the bytes you tested. Find the update group ID, then republish it to 10 per cent of production users:
eas update:list --branch preview
eas update:republish --group <group-id> --destination-channel production \
--rollout-percentage 10 \
--message "Friday closes at 13:00" \
--private-key-path ../keys/private-key.pemReplace <group-id> with the ID from the list. Watch crash reports and support messages for a few hours, then widen the rollout using the new group ID that update:republish printed:
eas update:edit <production-group-id> --rollout-percentage 50
eas update:edit <production-group-id> --rollout-percentage 100If something is wrong while the rollout is still partial, send everyone back to the previous update:
eas update:revert-update-rollout --group <production-group-id> \
--private-key-path ../keys/private-key.pemAfter a full rollout, roll back instead. update:rollback republishes the update before the bad one, or, if there was none, tells phones to run the code inside their build:
eas update:rollback <production-group-id> \
--message "Roll back Friday hours" \
--private-key-path ../keys/private-key.pemA rollback is itself an update. Phones pick it up on their next check, so a phone that stays offline keeps running the bad update until it reconnects. For fixes that matter to safety or money, say so in the app as well.
Check it worked
The preview phone shows the Friday hours and Running: update <id>, where the ID matches the one eas update printed. eas update:list --branch production shows the republished group with its rollout percentage, and after a rollback the newest entry on the branch is the rollback message.
Remove the practice folder, including the keys, when you are finished:
rm -rf ~/ota-demoNext steps
- Make the builds that receive your updates, and submit them to the stores: build and submit an app with EAS.
Related tutorials
- Write end-to-end mobile tests with MaestroYou will have a small Maestro suite for a mobile app, with stable test IDs in React Native or Flutter, a shared sign-in flow fed by environment variables, smoke and full runs split by tags, and a CI job that runs the smoke flows on an Android emulator.
- Store data in a SwiftUI app with SwiftDataYou will build a small shop stock app that saves suppliers and products on the iPhone with SwiftData, lists them with sorted and filtered queries, survives a schema change through a migration plan, and is checked by tests that run against an in-memory store.
- Store data in a Flutter app with Drift and SQLiteYou will build a small shop credit book in Flutter 3.50 that keeps customers and what they owe in SQLite through Drift 2.35, with typed queries, a join, a list that redraws itself from a watch() stream, a tested schema migration and in-memory tests for all of it.
Need this done for you?
Padding does this work for growing companies, from the first diagnosis to a system that keeps working.
Get new tutorials