Skip to content

Conversation

@jmagman
Copy link
Member

@jmagman jmagman commented Sep 18, 2021

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 LastUpgradeCheck and objectVersion as already resolved by Xcode 13.

Screen Shot 2021-08-11 at 4 18 11 PM

Update the Swift Runner.xcscheme template missed in #88074.

Update the integration and other projects in the repo by running flutter build ios.

@jmagman jmagman added platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. t: xcode "xcodebuild" on iOS and general Xcode project management labels Sep 18, 2021
@jmagman jmagman self-assigned this Sep 18, 2021
@flutter-dashboard flutter-dashboard bot added d: examples Sample code and demos c: contributor-productivity Team-specific productivity, code health, technical debt. labels Sep 18, 2021
@google-cla google-cla bot added the cla: yes label Sep 18, 2021
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1300"
Copy link
Member Author

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;
Copy link
Contributor

@christopherfujino christopherfujino Sep 21, 2021

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?

Copy link
Member Author

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.

Copy link
Member Author

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)

Copy link
Contributor

@christopherfujino christopherfujino left a 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

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fluttergithubbot fluttergithubbot merged commit 1b53f7b into flutter:master Sep 22, 2021
@jmagman jmagman deleted the xcode-project-migration branch September 22, 2021 20:33
clocksmith pushed a commit to clocksmith/flutter that referenced this pull request Oct 29, 2021
auto-submit bot pushed a commit that referenced this pull request May 2, 2023
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.
auto-submit bot pushed a commit that referenced this pull request Jan 3, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt. d: examples Sample code and demos platform-ios iOS applications specifically t: xcode "xcodebuild" on iOS and general Xcode project management tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants