fix(ios): drop the android-only default flavor when building the ipa - #2673
Conversation
pubspec sets default-flavor: production for the Android product flavors, but Flutter resolves it on every platform (flutter_command.dart: cliFlavor ?? defaultFlavor). flutter build ipa therefore looked for a Production scheme, which the iOS project does not define — it has a single Runner scheme and only Debug/Release/Profile configurations — and aborted with the misleading 'You must specify a --flavor option to select one of the available schemes', listing the virtual SwiftPM package schemes as if they were flavors. Strip the key for the duration of the build and restore it on any exit path, so local iOS builds stop needing the manual edit. appFlavor becomes null instead of 'production'; the app reads it only to draw the beta banner, so production behaviour is unchanged. Broken by 50baefd, which added the key; the iOS release workflow never reached this step before today.
|
Claude finished @ethicnology's task in 2m 35s —— View job Review of PR #2673 — drop android-only default flavor for iOS ipa builds
Verdict: the change is correct. No security issues, no regressions. I verified each claim in the PR description against the code; one minor cosmetic nitpick below. (Note: I can only update this single comment, so findings are posted here rather than as inline review comments.) What I verified
Minor nitpick (cosmetic)Double restore on Ctrl‑C — trap '[ -f "$$backup" ] && cp "$$backup" pubspec.yaml; rm -f "$$backup"' EXIT INT TERMOne observation, not a defect: if someone edits |
pubspec sets default-flavor: production for the Android product flavors, but Flutter resolves it on every platform (flutter_command.dart: cliFlavor ?? defaultFlavor). flutter build ipa therefore looked for a Production scheme, which the iOS project does not define — it has a single Runner scheme and only Debug/Release/Profile configurations — and aborted with the misleading 'You must specify a --flavor option to select one of the available schemes', listing the virtual SwiftPM package schemes as if they were flavors.
Strip the key for the duration of the build and restore it on any exit path, so local iOS builds stop needing the manual edit. appFlavor becomes null instead of 'production'; the app reads it only to draw the beta banner, so production behaviour is unchanged.
Broken by 50baefd, which added the key; the iOS release workflow never reached this step before today.