# Add Over-the-Air Updates to an Expo App

Yes. An agent adds EAS Update to your Expo app: expo-updates, a runtime version policy, channels in eas.json and an in-app update check, and opens a PR.

[Run this on Rush](https://cloud.getrush.ai/run/add-ota-updates/expo/). Opens the console with this prompt ready to send, in a Project that has your repository.

## What the agent does

The agent clones the app into its own cloud sandbox and reads its Expo configuration before it adds a module. In an app like `stickersmash` in expo/examples, `package.json` sets `main` to `expo-router/entry`, pins `expo` ~58.0.0-preview.7 with `expo-router`, `expo-constants`, `expo-device`, `expo-image-picker`, `expo-media-library` and `expo-splash-screen` at matching SDK versions, `react` 19.3.0 and `react-native` 0.88.0-rc.1, and has `start`, `lint` and a `deploy` script that exports the web build and runs `eas-cli deploy`. `app.json` names the app `StickerSmash` with slug `StickerSmash`, `version` 1.0.0, the `stickersmash` scheme, adaptive icons for Android, `web.output` of `server`, the `expo-router` and `expo-splash-screen` plugins, and `typedRoutes` and `reactCompiler` experiments. There is no `expo-updates` dependency, no `updates` or `runtimeVersion` key, no `eas.json` and no EAS project id, so every change to the app today needs a new store build. One sibling example, `with-splash-screen`, does list `expo-updates`, which shows the version pattern to follow.

The agent installs `expo-updates` with `npx expo install`, so the version matches the SDK the way the other `expo-*` packages do, and edits `app.json`: a `runtimeVersion` with the `appVersion` policy, so an update is only delivered to builds whose `version` matches, and an `updates.url` pointing at the EAS Update endpoint for the project id, which `eas update:configure` fills in. The project id needs an Expo account, so the agent writes a clearly marked placeholder and documents the one command that replaces it rather than inventing one. It adds `eas.json` with `development`, `preview` and `production` build profiles, where `preview` and `production` each set a `channel` of the same name, so an update published to the `preview` channel reaches only preview builds, and a `development` profile with `developmentClient` on for a dev build that can receive updates during testing.

The in-app side is small but visible. In `src/app/_layout.tsx`, which today renders a `Stack` with the `(tabs)` group and a `StatusBar`, the agent adds a check that runs once on launch outside `__DEV__` and only when `Updates.isEnabled`: `checkForUpdateAsync`, then `fetchUpdateAsync` and `reloadAsync` when one is available, wrapped so a network failure is logged and ignored rather than shown. The About tab in `src/app/(tabs)/about.tsx` gains a line built from the `useUpdates` hook showing the running `updateId`, the `channel` and the `runtimeVersion`, so someone testing can tell which update they are on. `package.json` gets `update:preview` and `update:production` scripts that call `eas update --channel` with a message, next to the existing `deploy` script.

Checks run without an Expo account. The agent runs `npx expo install --check` to confirm every `expo-*` package matches the SDK, `npx expo config --type public` to print the resolved `updates` and `runtimeVersion` so the policy is visible in the transcript, `npm run lint`, which is `expo lint`, `npx tsc --noEmit` against the `expo/tsconfig.base`-derived `tsconfig.json`, and `npx expo export --platform ios --platform android` to prove the bundle builds with the new module. Publishing an update with `eas update` needs an EAS login and an existing build, so the pull request records that step as yours; if the Project holds an `EXPO_TOKEN` as a secret, the prompt can ask the agent to run `eas update:configure` and a first `eas update --channel preview` itself.

## Start it with one API call

`POST https://api.phoenix.so/o/{org}/sessions`

```json
{
  "agent": "claude",
  "input": "Add EAS Update over-the-air updates to this Expo app. Read package.json, app.json, tsconfig.json, every file under src/app and the README first. Install expo-updates with npx expo install so it matches the SDK. In app.json add runtimeVersion with the appVersion policy and an updates.url with a clearly marked placeholder project id, and document the eas update:configure command that fills it in. Add eas.json with development (developmentClient), preview and production build profiles, with preview and production each on a channel of the same name. In the root layout add a launch-time check that, outside __DEV__ and only when Updates.isEnabled, calls checkForUpdateAsync, fetchUpdateAsync and reloadAsync and swallows network errors. Show the current updateId, channel and runtimeVersion on the About tab with the useUpdates hook. Add update:preview and update:production scripts. Run npx expo install --check, npx expo config --type public, npm run lint, npx tsc --noEmit and npx expo export for ios and android. Do not publish an update. Open a pull request listing the files, the channel table, what an OTA update can and cannot change, and the command output.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
```

1. **Get an API key.** In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
2. **Send the request.** POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
3. **Read what came back.** Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

## What comes back

What comes back is a pull request on its own branch that adds `expo-updates` to `package.json` with the two update scripts, adds `eas.json`, edits `app.json` for `runtimeVersion` and `updates.url`, changes `src/app/_layout.tsx` for the launch check and `src/app/(tabs)/about.tsx` for the version line, and extends the README with the one-time `eas update:configure` step and how to publish to each channel. The tab layout, the sticker screen and the components are unchanged.

The description has a small table of build profile, channel and the command that publishes to it, a short list of what an update can change (JavaScript and assets) and what still needs a build (native modules, `app.json` keys that change the native project, a new `runtimeVersion`), and the output of `expo config`, `expo lint`, `tsc` and `expo export`. The transcript at `GET /o/{org}/sessions/{id}/messages` keeps each command and its output, so a reviewer can read the resolved `runtimeVersion` policy and the export summary rather than take the pull request's word for it.

Before merging, a reviewer runs `eas update:configure` once with the team's Expo account, confirms the `appVersion` policy suits how the team bumps `version`, and makes a `preview` build so the first update has something to reach. A follow-up on the same session can switch the policy to `fingerprint`, add a GitHub Actions workflow that publishes to `preview` on every push to `main`, or add an in-app prompt instead of an immediate reload.

## Run it on every new Expo app

A team that maintains several Expo apps runs this once per repository. From a script, send the body above to `POST /o/{org}/sessions` with each repository in `resources`, one run per repository, and a `request_id` that is a UUID v5 of the repository name so a retry is safe. Give the key a `webhook_url` and every run the key starts posts `run.completed` with `data.session_url` when its turn ends; a handler reads the pull request link from the session.

Once updates are configured, add an automation to the Project with a `github` trigger on `pull_request.opened` and `pull_request.synchronize` and a prompt that reads the pull request's diff and comments whether it can ship as an OTA update or needs a new build, by checking for native module additions and `app.json` changes. The trigger clones that branch and places the event after the prompt, and the automation starts at most `max_runs_per_hour` runs in an hour.

## Why run it on Rush?

Over-the-air updates are mostly configuration, and the configuration has a sharp edge: a `runtimeVersion` policy that does not match how the team ships means updates silently reach no one, or reach a build whose native code cannot run them. The agent reads the actual `version`, plugins and dependencies in its own sandbox, chooses the policy to fit them, and prints the resolved configuration into the transcript so the choice is visible before anything is published.

Every `expo install --check`, `expo config`, `expo lint`, `tsc` and `expo export` and its output stay in the run's transcript, so the pull request's claim that the bundle builds with `expo-updates` in it is checkable, and the laptop that handed off the task is free while it happens. Several apps can get the same channel layout at once, each in its own sandbox and its own pull request.

## Frequently asked questions

### What can an OTA update change?

JavaScript and assets: screens, components, images and anything bundled by Metro. It cannot add a native module, change `app.json` keys that alter the native project, or move to a new `runtimeVersion`; those need a new build. The pull request lists both columns so the team knows which path a change takes.

### Does this work in Expo Go?

No. Expo Go does not receive EAS updates, which is why the agent adds a `development` profile with `developmentClient` in `eas.json`: a dev build or a `preview` build is where the first update lands. The launch check is also skipped under `__DEV__` so local development is unchanged.

### Why the appVersion policy?

Because `app.json` already carries a `version` of 1.0.0 and the team bumps it for store releases, so an update published for 1.0.0 reaches exactly the builds made from it. The `fingerprint` policy computes the version from the native project instead and is a one-line change in `app.json` if the team prefers it.

### Will the agent publish an update?

Not by default. `eas update` needs an Expo account and at least one build on the channel, so the pull request documents `eas update:configure` and the first `eas update --channel preview` for a maintainer. If the Project provides an `EXPO_TOKEN` as a secret and the prompt asks, the agent can run both and quote the update id.

### Does the app reload under the user?

The example check fetches and reloads on launch, when nothing is on screen yet, and does nothing when there is no update or no network. A follow-up can change it to download in the background and show a prompt, using the same `useUpdates` hook the About tab now reads from.

## More Expo jobs

- [Add Push Notifications to an Expo App from a Linear Issue](https://getrush.ai/run/add-push-notifications/expo/)
- [Add Storybook to an Expo App](https://getrush.ai/run/add-storybook/expo/)
- [Add TanStack Query to an Expo App](https://getrush.ai/run/add-tanstack-query/expo/)

## More jobs like this: Hand off a long task

- [Add an OTLP Exporter for Your Own Backend to the OpenTelemetry Collector](https://getrush.ai/run/add-otlp-exporter/opentelemetry/)
- [Add Output Caching to an ASP.NET Core Minimal API](https://getrush.ai/run/add-output-caching/dotnet/)
- [Add OWASP Dependency-Check to a Gradle Build](https://getrush.ai/run/add-owasp-dependency-check/gradle/)

## Keep reading

- [How a Rush run works on your repository, from request to pull request](https://getrush.ai/cloud/)
- [Compare cloud agents, agent sandboxes and AI code review](https://getrush.ai/compare/)
- [Rush pricing: Free, Pro and Max](https://getrush.ai/pricing/)
