---
title: "Recipe: phone release builds"
description: "Release builds for a phone: the commands, signing, and where the artifact lands."
modificationDate: "2026-11-14"
---

> ## 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: phone release builds

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

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

</AgentInstructions>

Run in the app directory. `--json` reports the artifact's absolute `path`,
`target`, `trust` and (Apple) `signing`; failures report `code` and `error`.
Logs: stderr. Releases omit the agent; no `--run`, `--prebuild` or `--test`.

Production bakes with updates need `deploy.signing.keys` and
`EXACT_UPDATE_RECEIPT` (authenticated receipt) or `EXACT_UPDATE_GENESIS=1`
(new stream). Without updates, set `deploy.store.ios` to `"0"`. Android
has a store only at `deploy.store.android` `"A"` (absent: `"0"`).

**iOS Simulator**, no installation or signing team:

```prompt Make a release build for a phone
Make a release build of the Exact app in this folder for an iPhone, the iOS Simulator or Android. Use https://github.com/expo/exact/blob/main/docs/recipes/mobile-build.md as the source for each step. The Exact checkout has the same page at docs/recipes/mobile-build.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 which build, ask me: the iOS Simulator, a signed iPhone, an unsigned device app, an Android APK or an Android App Bundle. For a signed iPhone, ask me for the team id and the UDID of the phone. For an App Bundle, ask me to set `EXACT_KEYSTORE` (a file path), `EXACT_KEYSTORE_PASSWORD`, `EXACT_KEY_ALIAS` and `EXACT_KEY_PASSWORD` in the environment you run in. Never write one of them into a file in this folder.
3. Before a first build, run `bun <exact2>/scripts/exact.mjs setup --check --platform ios` (or `android`). Tell me what it lacks before you install anything.
4. A production build with updates needs `deploy.signing.keys`, and `EXACT_UPDATE_RECEIPT` or `EXACT_UPDATE_GENESIS=1` (a new stream): ask me which. Without updates, `deploy.store.ios` is `"0"`. Ask me before you change `deploy` in app.json.
5. For a store upload, ask me for `EXACT_VERSION` and `EXACT_BUILD_NUMBER` and export both before building. The build number rises with each upload.
6. Run the command for that build. Simulator: `bun exact.mjs ios --release --no-install --json`. Signed iPhone: `DEVELOPMENT_TEAM=<team-id> bun exact.mjs ios --device --phone <udid> --release --no-install --json`. Unsigned: `bun exact.mjs ios --device --release --unsigned --json`. APK: `EXACT_UPDATE_TRUST=production bun exact.mjs android --release --no-install --json`. App Bundle: `bun exact.mjs android --bundle --json`. With `--json`, add no `--run`, `--prebuild` or `--test`. If a build names `--write-locks`, run it once and keep the files it generates.
7. Read the one JSON object the build prints: `path`, `target`, `trust` and (Apple) `signing`, or `code` and `error` for a failure. The logs are on stderr. Report any build failure that predates your changes or persists after three rounds of fixes, and record it as in step 8.
8. 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.
9. Tell me the command you ran and the artifact's `path`, `trust` and `signing`. The build uploads nothing to a store: that is mine to do. If no profile covers the app and the phone, I must use Xcode's automatic signing for that bundle id and team.
```

```sh
bun exact.mjs ios --release --no-install --json
```

`--sim <udid|name>` selects it; omit `--no-install` to install.

**Signed iPhone:** needs a paired phone, Apple Development identity with
private key, and profile covering its UDID, bundle id and entitlements:

```sh
DEVELOPMENT_TEAM=<team-id> bun exact.mjs ios --device --phone <udid> --release --no-install --json
```

The team picks an installed profile and identity. `EXACT_PROFILE=<file.mobileprovision>`
and `EXACT_IDENTITY=<certificate-sha1>` override them. If no profile covers
this app and phone, use Xcode's automatic signing for that bundle id and team.

**No team or phone:** an ad-hoc signed device `.app`, no installation:

```sh
bun exact.mjs ios --device --release --unsigned --json
```

No profile, identity or icon needed. `--unsigned --run` refuses: stock iPhones
cannot launch it. `--archive .exact/app.ipa` adds an IPA for re-signing and
requires a square AppIcon of at least 512 px; its path is relative to the
working directory. iOS builds balanced (games: speed); `--optimize` overrides.

**Android APK**, no adb contact:

```sh
EXACT_UPDATE_TRUST=production bun exact.mjs android --release --no-install --json
```

Omit `--no-install` to install on a device (`ANDROID_SERIAL` selects
one). Maven modules need `--write-locks` once; keep the generated
lock/verification files. Missing locks name the command before compiling.

**Android App Bundle:** supply all four upload-key variables:
`EXACT_KEYSTORE` (file path), `EXACT_KEYSTORE_PASSWORD`, `EXACT_KEY_ALIAS`
and `EXACT_KEY_PASSWORD`. An APK uses them too.
`EXACT_VERSION` sets `versionName` (default `0.1.0`); `EXACT_BUILD_NUMBER`
sets `versionCode` (default `1`, integer 1–2100000000). Raise it per upload.

```sh
bun exact.mjs android --bundle --json
```

Release and production trust, no adb installation.
Under `target/android/app/outputs/`, the bundle is
`bundle/release/app-release.aab`; the APK is `apk/release/app-release.apk`.

With [Play App Signing](https://support.google.com/googleplay/android-developer/answer/9842756),
you supply the upload key. Google holds the app signing key and signs the
APKs delivered to users. This command uploads nothing to Play; submission
remains unverified.

Before a first build, `bun <exact2>/scripts/exact.mjs setup --check --platform ios`
(or `android`) names what it lacks; CI:
[native CI preparation](https://exact.expo.dev/reference/developer/run-an-app-from-a-terminal-on-macos.md#native-ci-preparation).
