-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Build iOS apps using Swift Packages #59009
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
|
The difference between this and #58522 is cb5b9e2
#58522 |
christopherfujino
left a comment
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, with one nit question
|
|
||
| @override | ||
| String migrateFileContents(String fileContents) { | ||
| const String podLocation = ''' |
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.
nit. is this guaranteed to match, even with the surrounding whitespace?
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.
We generated this as part of the template with https://github.com/flutter/flutter/pull/4893/files#diff-fddbdff9cdb9e32ee9b9a95f74f30788R5-R8. Xcode and CocoaPods won't add it (at least how we have the project set up now).
Description
Another attempt at #58522.
Swift packages cannot be added to a newly created Flutter iOS app due to the Xcode project settings (not workspace) being set to the "legacy" build location. Update to the "default" Xcode build location.

Update templates, add tool migrator, let tool upgrade all examples and integration tests.
Related Issues
Fixes #57083
Related to #49654
Tests
Migrator tests
Added the basic Apple example Swift package to an existing integration test. The adds a networked dependency to integration test, but hopefully Apple never removes this (and if they do, we can replace with another one).
Checklist
///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change