Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

docs(mobile): document EXPO_APPLE_TEAM_ID for multi-team signing (MUL-6375) (#7196)

Bohan Jiangc5f00bbf5c61
diff --git a/apps/mobile/.env.example b/apps/mobile/.env.example
index 54c449416a..0bbc2521e4 100644
--- a/apps/mobile/.env.example
+++ b/apps/mobile/.env.example
@@ -32,3 +32,13 @@ EXPO_PUBLIC_API_URL=https://<api-host>
# never overridable (variants must stay on their canonical ids so the same
# device can hold all three side-by-side).
# EXPO_BUNDLE_IDENTIFIER_DEV=com.yourname.multica.dev
+
+# Optional. Apple Developer Team ID used to sign local iOS builds. Only needed
+# if your Apple ID belongs to more than one team (a personal team plus an
+# employer's, say) — with a single team the build picks it automatically. Find
+# the id in the Apple Developer Portal under Membership.
+#
+# Unlike the bundle id overrides this is variant-independent: the same team
+# signs dev / staging / production, so setting it once is enough. Leave it unset
+# to keep Expo's own signing-identity detection.
+# EXPO_APPLE_TEAM_ID=ABCDE12345
diff --git a/apps/mobile/README.md b/apps/mobile/README.md
index 2169dd3e8a..2fdc1607af 100644
--- a/apps/mobile/README.md
+++ b/apps/mobile/README.md
@@ -23,6 +23,13 @@ export EXPO_BUNDLE_IDENTIFIER_PROD=com.yourname.multica
pnpm ios:mobile:device:prod:release
```
+**If your Apple ID belongs to more than one Apple Developer team** — a personal team plus an employer's, say — the build signs with the first identity it finds, which may not be the team you meant, and it keeps reusing that choice on every later build. Pin the right one (find the id in the Apple Developer Portal under Membership):
+
+```bash
+export EXPO_APPLE_TEAM_ID=ABCDE12345
+pnpm ios:mobile:device:prod:release
+```
+
**7-day signing limit**: a free Apple ID signs builds for 7 days. After that, plug back into the Mac and re-run the command to re-sign. An Apple Developer Program account ($99/yr) extends this to 1 year.
Everything below is for app developers — you can ignore the rest if you only wanted a personal install.
@@ -58,6 +65,8 @@ cp apps/mobile/.env.example apps/mobile/.env.development.local
If your Apple ID isn't on the Multica Apple Developer team yet, also uncomment and set `EXPO_BUNDLE_IDENTIFIER_DEV` to a reverse-domain you own (e.g. `com.yourname.multica.dev`). This **only** overrides the dev variant — staging / production bundle ids are intentionally not overridable so variants can coexist.
+If your Apple ID belongs to more than one Apple Developer team, also set `EXPO_APPLE_TEAM_ID` to the team that should sign your builds. Unlike the bundle id overrides it applies to every variant, and it is re-applied on each run — so it also fixes a checkout that has already latched onto the wrong team.
+
## Build it onto your iPhone
Two paths, depending on what you want to do:
diff --git a/apps/mobile/app.config.ts b/apps/mobile/app.config.ts
index 0bcc7de24a..e578383331 100644
--- a/apps/mobile/app.config.ts
+++ b/apps/mobile/app.config.ts
@@ -32,6 +32,16 @@ export default ({ config }: ConfigContext): ExpoConfig => {
icon: "./assets/icon.png",
ios: {
supportsTablet: false,
+ // Pins DEVELOPMENT_TEAM on every prebuild. Leaving it unset is the normal
+ // path — `expo run:ios` then resolves a signing identity from the Keychain
+ // itself, which is right when the Apple ID owns exactly one team. With
+ // several (a personal team plus an employer's) it takes the *first*
+ // identity found whenever the terminal is non-interactive, writes that
+ // choice into the generated ios/, and never clears it again: prebuild only
+ // writes DEVELOPMENT_TEAM when a value is present, so a project pinned to
+ // the wrong team stays wrong until ios/ is deleted. Setting this re-applies
+ // the intended team on every `scripts/ios-run.sh` run, which also repairs
+ // an already-mispinned checkout.
appleTeamId: process.env.EXPO_APPLE_TEAM_ID,
// Per-variant bundle id overrides exist for one reason: an Apple ID
// can only sign bundle prefixes it owns, so contributors not on the