Migrate Xcode projects last version checks to Xcode 15.1 (#140256)

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 https://github.com/flutter/flutter/issues/140253
See also https://github.com/flutter/flutter/issues/125817 and https://github.com/flutter/flutter/pull/90304.
This commit is contained in:
Jenn Magder
2024-01-03 15:05:46 -08:00
committed by GitHub
parent d0f3777f2b
commit 076cb8a328
104 changed files with 165 additions and 132 deletions

View File

@@ -38,10 +38,10 @@ class XcodeProjectObjectVersionMigration extends ProjectMigrator {
// objectVersion value has been 46, 50, 51, and 54 in the template.
RegExp(r'objectVersion = \d+;'): 'objectVersion = 54;',
// LastUpgradeCheck is in the Xcode project file, not scheme file.
// Value has been 0730, 0800, 1020, 1300, and 1430 in the template.
RegExp(r'LastUpgradeCheck = \d+;'): 'LastUpgradeCheck = 1430;',
// Value has been 0730, 0800, 1020, 1300, 1430, and 1510 in the template.
RegExp(r'LastUpgradeCheck = \d+;'): 'LastUpgradeCheck = 1510;',
// LastUpgradeVersion is in the scheme file, not Xcode project file.
RegExp(r'LastUpgradeVersion = "\d+"'): 'LastUpgradeVersion = "1430"',
RegExp(r'LastUpgradeVersion = "\d+"'): 'LastUpgradeVersion = "1510"',
};
originalToReplacement.forEach((Pattern original, String replacement) {