---
title: "Recipe: over-the-air updates"
description: "An installed iOS, macOS, Android or Linux app takes signed updates to its Contract, assets and app.ts."
modificationDate: "2026-11-30"
---

> ## Documentation index
> Fetch the complete documentation index at: https://exact.expo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Recipe: over-the-air updates

<AgentInstructions>

## Submitting feedback

From the app's directory, read `bun exact.mjs feedback status`. Under `never`, keep no note.
Respect `EXACT_FEEDBACK=0` and do not change the policy.

Otherwise record specific, actionable feedback with:
`bun exact.mjs feedback note "Exact docs: https://exact.expo.dev/recipes/over-the-air-updates: <what was wrong or missing>"`

The note goes to Expo only as that status allows. Include no secrets or personal data.

</AgentInstructions>

An installed iOS, macOS, Android or Linux app takes signed updates to its
Contract, assets and `app.ts`. A new grant or native code needs a new binary
([store update](https://exact.expo.dev/recipes/store-update.md)). In full:
[reference](https://exact.expo.dev/reference/developer/over-the-air-updates.md).

```prompt Send updates to my app over the air
Make the Exact app in this folder take signed over-the-air updates, and show a banner when one is ready. Use https://github.com/expo/exact/blob/main/docs/recipes/over-the-air-updates.md as the source for each step. The Exact checkout has the same page at docs/recipes/over-the-air-updates.md.

1. If this folder is not an Exact app (it has no exact.mjs and app.contract), stop and tell me. Find the Exact checkout (the folder with scripts/exact.mjs); if you cannot find it, ask me where it is.
2. If I did not say, ask me which platforms take updates (iOS, macOS, Android, Linux), where the channel is served (my HTTPS URL, or `"appdrop"`), and when an update applies (`next-launch`, `app-decides` or `immediate`). A new grant or native code needs a new binary, not an update.
3. If app.json names no signing key, make one: `bun <exact2>/scripts/deploy.mjs keygen <name>`. It writes the private key to `~/.config/exact/keys/<name>.pem` and prints the public half. Never copy the private key into this folder or print it.
4. In app.json, write `deploy` as the recipe shows: `store` with `"A"` for each platform that takes updates, `channels`, `signing` with the key and its public half, and `activate`.
5. In app.contract, read `resource delivery = exactDelivery() as shape Delivery`. While `delivery.staged` is true, show a row with a button whose action calls `deliveryActivate()`. The web has no update store: `staged` stays false there.
6. Follow the platform checks in docs/start-here.md (`bun exact.mjs docs platform checks`) for the targets in the app's AGENTS.md and app.json until they pass. Read the reports, including counted findings; a zero exit code alone does not mean clean. Fix the app, not the test. If a finding stays after three rounds of fixes, or the app had it before you changed anything, record it (step 9) and report it; do not keep trying.
7. Build the release binary. A new stream needs `EXACT_UPDATE_GENESIS=1` (simulator: `EXACT_UPDATE_GENESIS=1 bun exact.mjs ios --release`; phone: docs/recipes/mobile-build.md; Android adds `EXACT_UPDATE_TRUST=production`). A stream that has releases needs `EXACT_UPDATE_RECEIPT`. Ask me before you publish. Then start the stream: `bun exact.mjs push --origin <dir>` (the directory the channel serves). Omit `--origin` for `"appdrop"`.
8. For a later edit, run `bun exact.mjs deploy --dirty --origin <dir>` and show me what it prints. For `"appdrop"`, run `bun exact.mjs deploy --dirty` instead. Add `--yes` only when I agree.
9. When a doc was wrong or missing, or a step needed a workaround, read `bun exact.mjs feedback status`. Under `never`, keep no note. Otherwise record it: `bun exact.mjs feedback note "<what happened>"`, which goes to Expo only as that status says. Do not change the policy; tell me how many notes you kept.
10. Tell me the key's name, the `deploy` block, what the tests and checks reported, and what you published. If I chose my own HTTPS URL, I must serve the directory there. Keep the private key out of the repository.
```

1. **Make a key.** `bun <exact2>/scripts/deploy.mjs keygen myapp` writes
   `~/.config/exact/keys/myapp.pem` and prints the public half.
2. **Declare it in `app.json`:**

   ```json
   "deploy": {
     "store": { "ios": "A", "macos": "A", "android": "A" },
     "channels": { "prod": "https://updates.example.com" },
     "signing": { "key": "myapp", "keys": { "myapp": "<public half>" } },
     "activate": "app-decides"
   }
   ```

   - `store`: `"A"` links the update store into that platform's binary. A
     first build writes `"0"`, which links none, as an absent `android` does.
   - `channels`: the URL a binary reads at build time and checks. Serve the
     directory step 4 writes there, over HTTPS. `"appdrop"` is AppDrop's
     origin for the key, with no server.
   - `activate`: `next-launch` (default; boots on cold launch and accepts
     `deliveryActivate()` sooner), `app-decides` (`deliveryActivate()` only), or
     `immediate` (foreground).
   - `check.interval`: seconds between foreground checks (default 900).
     Coming to the foreground checks, at most once a minute.
3. **Build the binary people install.** A release build with a store needs
   `EXACT_UPDATE_GENESIS=1`, which starts a stream at sequence zero, or
   `EXACT_UPDATE_RECEIPT`, a published release to continue. A simulator and
   Android ([phone builds](https://exact.expo.dev/recipes/mobile-build.md)):

   ```sh
   EXACT_UPDATE_GENESIS=1 bun exact.mjs ios --release
   EXACT_UPDATE_TRUST=production EXACT_UPDATE_GENESIS=1 bun exact.mjs android --release
   ```

4. **Start the stream.** After a genesis build, run
   `bun exact.mjs push --origin ../origin`. `--origin` names the directory
   the channel serves. Omit it for `"appdrop"` on `push` and `deploy`.
5. **Publish later edits.** Run `push` again (`--watch` pushes on save) or
   deploy a snapshot:

   ```sh
   bun exact.mjs deploy --dirty --origin ../origin
   bun exact.mjs deploy --dirty --origin ../origin --yes
   ```

   `--dirty` includes working-tree edits and is required for apps outside
   the checkout. On Apple and Linux, `deploy` starts a new stream from an
   analysis bake for a subsequent release build.
6. **Offer it.** `staged` is true while a downloaded update waits:

```contract
shape Delivery
  staged: bool

component App
  resource delivery = exactDelivery() as shape Delivery
  action update
    deliveryActivate()
  view
    column
      if delivery.staged
        row testId="update-banner"
          text "An update is ready." flex=1
          button press=update testId="update-now"
            text "Update"
```

`deliveryActivate()` and `immediate` wait for composition, pointers, scroll
deceleration and gestures to end; module updates also wait for requests. They
apply without retry (`state.replacement.pending` names the hold).
