[codex] Align iOS dev auth with Mac dev builds
Summary
Fixes iOS dev pairing account verification by aligning iOS DEBUG/dev auth with the Mac dev build auth realm:
- defaults iOS dev builds to production Stack auth
- bakes
CMUXAuthEnvironmentinto the iOS app Info.plist fromios/scripts/reload.sh - keeps intentional local auth testing available through
CMUX_DEV_AUTH_ORIGIN=local/CMUXAuthEnvironment=development - adds focused coverage for the default and local override
Why
The QR transport path can succeed while account verification fails if the Mac dev build is signed into production Stack auth but the iOS DEBUG build mints a token from the development Stack project. That produces the observed state: macOS reports the iPhone connected, then iOS shows "Couldn't verify your account." Both dev builds now default to the same auth realm.
Validation
bash -n ios/scripts/reload.sh- In the main checkout,
ios/scripts/reload.sh --tag ios-close-workspace --device-onlybuilt and installed successfully withCMUX_AUTH_ENVIRONMENT=production - Verified the built iOS app Info.plist contains
CMUXAuthEnvironment=production - Clean temporary worktree build was attempted but blocked by missing local
GhosttyKit.xcframeworkartifact in/tmp, not by this patch
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.
Summary by cubic
Aligns iOS DEBUG/dev builds with the Mac dev build by defaulting to production Stack auth, with an opt-in local override. Fixes the “Couldn't verify your account” pairing failure caused by mismatched auth realms.
- Bug Fixes
- Default iOS dev builds to production auth; opt-in local dev via
CMUX_DEV_AUTH_ORIGIN=localorCMUXAuthEnvironment=development. - Resolve auth env in
MobileAuthCompositionfrom Info.plist andLocalConfig.plist, ignoring empty/unexpanded values; added tests and madeCMUXAuthEnvironmentEquatable. - Plist/config wiring: added
CMUXAuthEnvironmentandApiBaseURLto Info.plist; setCMUX_AUTH_ENVIRONMENT=productioninShared.xcconfig;reload.shsetsCMUX_AUTH_ENVIRONMENTfromCMUX_DEV_AUTH_ORIGIN(auto/prod/local).
- Default iOS dev builds to production auth; opt-in local dev via