-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Migrate iOS project to Xcode 13 compatibility #90304
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
Migrate iOS project to Xcode 13 compatibility #90304
Conversation
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <Scheme | ||
| LastUpgradeVersion = "1020" | ||
| LastUpgradeVersion = "1300" |
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.
The template was missed as part of #88074.
| testWithoutContext('skipped if nothing to upgrade', () { | ||
| const String xcodeProjectInfoFileContents = ''' | ||
| objectVersion = 50; | ||
| LastUpgradeCheck = 1300; |
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.
ubernit: is this indentation right?
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.
You're right, will fix. It doesn't matter for the test since whitespace is ignored.
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.
Edit: Actually it is "right" in that it looks like
classes = {
};
objectVersion = 50;
objects = {
attributes = {
LastUpgradeCheck = 1300;
And I just left off the extra lines. But I will include them since that's a better test (that no part of the file is edited)
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.
nit about indentation but LGTM
cyanglaz
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
1. Add iOS and macOS migration to mark "last upgraded" Xcode version to 14.3 to prevent `Update to recommended settings` warning. 2. Update iOS and macOS templates to same. 3. Update iOS template to set `BuildIndependentTargetsInParallel` to YES as suggested. I didn't add a migration for this since it seems like a minor optimization and I don't think it's worth a potentially botched/corrupted migration. 4. Run all example/integration test project to see migrator work. 5. Add some missing test projects to the build shard since I noticed they were missing and I had to build those manually outside `SHARD=build_tests`. Fixes #125817 See #90304 for Xcode 13 example.
Change the following in the `flutter create` templates. I didn't make any auto-migrations for existing apps because none seem that critical: 1. Turn on `ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS` in iOS and macOS. 1. Turn on `BuildIndependentTargetsInParallel` in macOS template. https://github.com/flutter/flutter/pull/125827/files#r1181817619 1. Turn on `DEAD_CODE_STRIPPING` in macOS template. 1. Set `ENABLE_USER_SCRIPT_SANDBOXING=NO` in iOS and macOS template. `flutter` scripts don't work with this on. This might require a migration in the future to explicitly turn this one off. However at least for now if the setting isn't present it defaults to `NO`. Add migration for `LastUpgradeVersion` so users won't see these validation issues in Xcode. Run migrator on all the example apps. A few aren't Flutter apps so I edited them in Xcode. Fixes #140253 See also #125817 and #90304.
Get rid of the "Update to recommended settings" warning for existing iOS projects (shows up on all supported versions of Xcode) by migrating the project to change
LastUpgradeCheckandobjectVersionas already resolved by Xcode 13.Update the Swift Runner.xcscheme template missed in #88074.
Update the integration and other projects in the repo by running
flutter build ios.