Repository navigation
docs: troubleshoot the Xcode FLUTTER_ build setting override warning - #700
Conversation
shorebird doctor and iOS release/patch warn when project.pbxproj hard-codes FLUTTER_* build settings. Explain why and how to remove them, and that FLUTTER_TARGET is allowed.
AbhishekDoshi26
left a comment
There was a problem hiding this comment.
Reviewed against xcodeproj_flutter_override_validator.dart and doctor.dart on shorebird main. One finding:
The intro leaves out shorebird init. The validator is in initAndDoctorValidators, and init_command.dart runs that list at the end of shorebird init. So a new user sees this warning first from init, not doctor. The PR description already lists init. Only the page is missing it.
The rest checks out: the message text matches the ValidationIssue, it's a warning (ValidationIssueSeverity.warning), FLUTTER_TARGET is the only exemption, and modules are scanned under .ios/. The validator also runs for iOS-framework release and patch (ios_framework_releaser.dart, ios_framework_patcher.dart), which "for iOS" covers well enough.
|
Pushed cacbb13. The intro now names |
Since CLI 1.6.94, Shorebird warns when an Xcode project hard-codes
FLUTTER_*build settings. The docs never explained that warning, so this adds a troubleshooting entry.What it covers
shorebird doctor,shorebird init, and iOS / iOS-frameworkreleaseandpatch. It's a warning, not an error, so builds aren't blocked. Taken fromiosCommandValidatorsandinitAndDoctorValidatorsindoctor.dart, and fromvalidatePreconditions, which only fails on errors.ValidationIssuetext inxcodeproj_flutter_override_validator.dart.Generated.xcconfig, and a value in the Xcode project overrides that file. A hard-codedFLUTTER_ROOT, for example, can make Xcode build part of the app with a different Flutter than Shorebird's. That's the failure the validator's doc comment describes.FLUTTER_TARGETis allowed (flavor entry points), and Flutter modules are checked under.ios/instead ofios/.Also adds
pbxprojto the shared cspell word list.