-
Notifications
You must be signed in to change notification settings - Fork 28.8k
Disable CocoaPods input and output paths in Xcode build phase and adopt new Xcode build system #33684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I noticed that this also required changes to some of the existing generated config files, how will this affect apps which have not been updated?
|
Existing apps that are currently building using the legacy build system will continue to use the legacy build system. No updates will be needed from developers. This will only impact newly generated apps. I updated the examples so no one would crack open those Xcode projects and notice the legacy build system and get confused. I am reluctant to migrate the build system under an existing app since that build system is stricter, and we could be exposing new compilation issues. It's definitely more risky, but if you think it's worth it @jonahwilliams and @cbracken, I can try. It might be annoying to developers that they updated flutter, then have to track down new Xcode compilation errors when their .dart code didn't change (though I suppose that probably exact scenario happens nearly every time Xcode is updated).
I updated the Podfile templates so new applications are set up correctly. I tested by Is there another template I'm missing? |
Ahh, no that's fine - I just missed it |
Is there any path forward here? |
Not really... @cbracken and I discussed this and we think it's an okay medium-term solution, and a trade-off that's worth getting off the legacy build system in case Xcode pulls the plug. From #20685 (comment)
|
742eb0f
to
9292630
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I confirmed that the macOS plugin flow works with the added line (and that it eliminates the strident warning in the Xcode UI about duplicate output files for the current macOS runner).
This change increased the minimum required version of CocoaPods, which caused a build failure on macOS slaves running an older version. I reverted this change with 9734f4e while the new version requirement configuration propagates through the CI system. |
Un-reverted with d053fe5. |
…pt new Xcode build system (flutter#33684) Updates the Podfile template to use the CocoaPod disable_input_output_paths installation option which prevents the [CP] Embed Pods Frameworks build phase from outputting the Flutter.framework files.
… and adopt new Xcode build system (flutter#33684)" This reverts commit ef792fc.
Description
Previously the Xcode new build system could not be adopted due to two Xcode project build phases both outputting the Flutter.framework (one for Flutter w/o packages and the other from CocoaPods). The legacy build system was more lenient about duplicate outputs. See #20685 (comment) for a good description of the problem.
This change updates the Podfile templates to use the CocoaPod disable_input_output_paths installation option, which prevents the [CP] Embed Pods Frameworks build phase from outputting the Flutter.framework files. This has the unfortunate side-effect of also preventing any input files, which means the Pods-Runner-frameworks.sh script will run on every incremental build.
This change also removes the workaround from 231784e opting into the Xcode legacy build system.
Related Issues
Fixes #20685.
Tests
I manually tested the
flutter create
flow and confirmed the generated Xcode project builds. Then I added packages and confirmed that Xcode project builds.Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze --flutter-repo
) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?