Files
Zain MehdiandClaude Opus 5 c99849d8a5 fix(mobile): re-apply app config to ios/ on every local iOS build (MUL-6206) (#6992)
The remedy documented in apps/mobile/README.md for a claimed bundle
identifier — export EXPO_BUNDLE_IDENTIFIER_PROD, then re-run
`pnpm ios:mobile:device:prod:release` — has no effect after the first build.
`expo run:ios` prebuilds only when ios/ is missing: ensureNativeProjectAsync
in @expo/cli returns early when the directory exists, so config plugins never
re-run and the project keeps the old identifier.

The same freeze hides every other app.config.ts change. A checkout whose ios/
was generated once still had the template bundle id, an empty
AppIcon.appiconset, no CFBundleDisplayName, no CFBundleURLTypes and no
NSPhotoLibraryUsageDescription — while every build reported success.

Route every ios:* script through scripts/ios-run.sh, which prebuilds before
running. The wrapper inherits the caller's dotenv/cross-env so prebuild and
run resolve the same APP_ENV and bundle identifier; a bare prebuild in a
prod/staging script would rewrite the project to the dev variant.

--no-install is safe because run:ios installs pods itself when Podfile.lock is
stale. --clean is avoided because expo-build-properties sets
buildReactNativeFromSource, making a clean prebuild far too slow for the
edit/run loop.

scripts/ios-run.test.sh stubs pnpm on PATH and asserts the call sequence:
prebuild precedes run:ios, arguments forward to run:ios only, and a failed
prebuild aborts before run:ios. It runs in mobile's existing test task.


Claude-Session: https://claude.ai/code/session_01GfpPip2LPR1y9bKKEssGLG

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-16 23:58:39 +08:00
..