This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index at /llms.txt, or add .md to any page's URL.
Recipe: over-the-air updates
An installed iOS, macOS, Android or Linux app takes signed updates to its Contract, assets and app.ts.
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). In full:
reference.
Send updates to my app over the air
Paste this into Claude, Cursor, Codex, or another agent.
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):
Terminal
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:
Terminal
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).
Is this helpful
Last updated November 30, 2026