---
title: "Recipe: a newer binary from the store"
description: "@exact/store-update says whether the App Store or Google Play has a newer binary and opens it, for a change Exact's own signed updates cannot carry."
modificationDate: "2026-11-23"
---

> ## 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: a newer binary from the store

<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/store-update: <what was wrong or missing>"`

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

</AgentInstructions>

`@exact/store-update` says whether the App Store or Google Play has a newer
binary and opens it (LLP 1133.038), for what Exact's own signed updates
(LLP 1030) cannot carry: a new host, a native module, a raised OS floor.

```prompt Offer an update from the store
Make the Exact app in this folder say when the App Store or Google Play has a newer binary, and open or start that update. Use https://github.com/expo/exact/blob/main/docs/recipes/store-update.md as the source for each step. The Exact checkout has the same page at docs/recipes/store-update.md.

1. If this folder is not an Exact app (it has no exact.mjs and app.contract), stop and tell me.
2. If I did not say which screen shows the offer, and whether the app may ever block until it updates, ask me before you write code. On Apple platforms the only gate is a minimum version that my own server names: if I want one, ask me for that server.
3. Install the package: `bun exact.mjs add @exact/store-update`. In app.ts, declare the grant line `net.fetch https://itunes.apple.com`, for an Android-only app too.
4. In app.contract, read `storeUpdateStatus()` as a resource. Show nothing while `available` is false. `available` does not mean an update exists: `updateAvailability` says that.
5. For `listed` (Apple), show a row the person may ignore, with `apple.version` and an `openStorePage()` button. Never block on `listed`. For Play, show the button that sends `startStoreUpdate(appUpdateType="flexible")` only when `updateAvailability` is `offered` and `android.flexibleAllowed` is true. Show a Restart button that calls `completeStoreUpdate()` once `android.installStatus` is `downloaded`, including on a later launch.
6. Block only if I asked for it, and only on Play's offer (`offered` and `android.immediateAllowed`), with `startStoreUpdate(appUpdateType="immediate")`.
7. Develop the screen in a drive, as the recipe shows: lay the status as JSON with `prefer extension store-update.storeUpdateStatus=`, and answer Play's `store-update` ticket with `"tap @N accepted"` (or `canceled`, `failed`) appended. Drive the offered status with `android.flexibleAllowed` both true and false and check that the flexible button appears only when allowed. In app.test.contract, test that the screen shows no offer with the agent's default status, a store install with nothing newer.
8. 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.
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 where the offer shows, what the drives, the tests and the checks reported, and what I must still do: Play's flows are untested against a real listing, so try one by internal app sharing with a higher `EXACT_BUILD_NUMBER`.
```

1. **Declare** the App Store lookup's grant line, Android-only apps too:

   ```ts
   export const grants = 'net.fetch https://itunes.apple.com';
   ```

2. **Read the status.** Show nothing while `available` is false: the store
   did not make this install. It does not mean an update exists;
   `updateAvailability` says that.

3. **Offer the update by what the store said.**
   - `listed` (Apple): a row the person may ignore, with `apple.version`
     and an `openStorePage()` button. Never block on it: the store may not
     offer that version to this device.
   - `offered` (Play) with `android.flexibleAllowed`: `startStoreUpdate(appUpdateType="flexible")`
     from a button. Call `completeStoreUpdate()` from a Restart button once
     `android.installStatus` is `downloaded`, including on a later launch.
4. **Block only on Play's offer** (`offered` and `android.immediateAllowed`:
   `startStoreUpdate(appUpdateType="immediate")`), or on a minimum version
   your own server names, which is Apple's only gate.
5. **Develop the UI under the agent.** No store is asked, and the status
   is a store install with nothing newer. Lay the status the screen needs.
   Play's flow is a `store-update` ticket: `clock settle` stops at it and
   prints its `@N`; run the drive again with `"tap @N accepted"` (or
   `canceled`, `failed`) appended. The package then refuses as Play would
   against the laid status.

   ```sh
   bun exact.mjs agent android 'prefer extension store-update.storeUpdateStatus={"available":true,"updateAvailability":"offered","android":{"flexibleAllowed":true}}' "tap update" "clock settle"
   ```

```text
use storeUpdateStatus, openStorePage, StoreUpdateStatus from "@exact/store-update"
use startStoreUpdate, completeStoreUpdate, StoreUpdateResult from "@exact/store-update/android"

component App
  resource store = storeUpdateStatus() as shape StoreUpdateStatus else empty()
  mutation started as shape StoreUpdateResult
  action update
    send started = startStoreUpdate(appUpdateType="flexible")
  action restart
    completeStoreUpdate()
  action open
    openStorePage()
  view
    column
      match store.android
        case some(p)
          if store.updateAvailability == "offered" and p.flexibleAllowed
            button press=update testId="update"
              text "Update"
          if p.installStatus == "downloaded"
            button press=restart
              text "Restart to Update"
        case none
          text ""
      if store.updateAvailability == "listed"
        button press=open
          text "Update in the App Store"
```

A universal purchase's Mac build answers `unknown`: its one record is the
iOS binary's. Play's flows are untested against a real listing; try one by
internal app sharing with a higher `EXACT_BUILD_NUMBER`.
