forked from firka/flutter
Update minimum required version to Xcode 12 (#77025)
This commit is contained in:
@@ -72,9 +72,7 @@ const String fixWithDevelopmentTeamInstruction = '''
|
||||
open ios/Runner.xcworkspace
|
||||
2- Select the 'Runner' project in the navigator then the 'Runner' target
|
||||
in the project settings
|
||||
3- Make sure a 'Development Team' is selected.\u0020
|
||||
- For Xcode 10, look under General > Signing > Team.
|
||||
- For Xcode 11 and newer, look under Signing & Capabilities > Team.
|
||||
3- Make sure a 'Development Team' is selected under Signing & Capabilities > Team.\u0020
|
||||
You may need to:
|
||||
- Log in with your Apple ID in Xcode first
|
||||
- Ensure you have a valid unique Bundle ID
|
||||
|
||||
@@ -106,7 +106,7 @@ Future<XcodeBuildResult> buildXcodeProject({
|
||||
}
|
||||
|
||||
final List<ProjectMigrator> migrators = <ProjectMigrator>[
|
||||
RemoveFrameworkLinkAndEmbeddingMigration(app.project, globals.logger, globals.xcode, globals.flutterUsage),
|
||||
RemoveFrameworkLinkAndEmbeddingMigration(app.project, globals.logger, globals.flutterUsage),
|
||||
XcodeBuildSystemMigration(app.project, globals.logger),
|
||||
ProjectBaseConfigurationMigration(app.project, globals.logger),
|
||||
ProjectBuildLocationMigration(app.project, globals.logger),
|
||||
|
||||
@@ -8,8 +8,6 @@ import '../../base/common.dart';
|
||||
import '../../base/file_system.dart';
|
||||
import '../../base/logger.dart';
|
||||
import '../../base/project_migrator.dart';
|
||||
import '../../base/version.dart';
|
||||
import '../../macos/xcode.dart';
|
||||
import '../../project.dart';
|
||||
import '../../reporting/reporting.dart';
|
||||
|
||||
@@ -20,15 +18,12 @@ class RemoveFrameworkLinkAndEmbeddingMigration extends ProjectMigrator {
|
||||
RemoveFrameworkLinkAndEmbeddingMigration(
|
||||
IosProject project,
|
||||
Logger logger,
|
||||
Xcode xcode,
|
||||
Usage usage,
|
||||
) : _xcodeProjectInfoFile = project.xcodeProjectInfoFile,
|
||||
_xcode = xcode,
|
||||
_usage = usage,
|
||||
super(logger);
|
||||
|
||||
final File _xcodeProjectInfoFile;
|
||||
final Xcode _xcode;
|
||||
final Usage _usage;
|
||||
|
||||
@override
|
||||
@@ -100,12 +95,9 @@ class RemoveFrameworkLinkAndEmbeddingMigration extends ProjectMigrator {
|
||||
}
|
||||
|
||||
if (line.contains('/* App.framework ') || line.contains('/* Flutter.framework ')) {
|
||||
// Print scary message if the user is on Xcode 11.4 or greater, or if Xcode isn't installed.
|
||||
final bool xcodeIsInstalled = _xcode.isInstalled;
|
||||
if(!xcodeIsInstalled || _xcode.currentVersion >= Version(11, 4, 0)) {
|
||||
UsageEvent('ios-migration', 'remove-frameworks', label: 'failure', flutterUsage: _usage).send();
|
||||
throwToolExit('Your Xcode project requires migration. See https://flutter.dev/docs/development/ios-project-migration for details.');
|
||||
}
|
||||
// Print scary message.
|
||||
UsageEvent('ios-migration', 'remove-frameworks', label: 'failure', flutterUsage: _usage).send();
|
||||
throwToolExit('Your Xcode project requires migration. See https://flutter.dev/docs/development/ios-project-migration for details.');
|
||||
}
|
||||
|
||||
return line;
|
||||
|
||||
@@ -29,8 +29,11 @@ import '../ios/mac.dart';
|
||||
import '../ios/xcodeproj.dart';
|
||||
import '../reporting/reporting.dart';
|
||||
|
||||
Version get xcodeRequiredVersion => Version(11, 0, 0, text: '11.0');
|
||||
Version get xcodeRecommendedVersion => Version(12, 0, 1, text: '12.0.1');
|
||||
Version get xcodeRequiredVersion => Version(12, 0, 1, text: '12.0.1');
|
||||
|
||||
/// Diverging this number from the minimum required version will provide a doctor
|
||||
/// warning, not error, that users should upgrade Xcode.
|
||||
Version get xcodeRecommendedVersion => xcodeRequiredVersion;
|
||||
|
||||
/// SDK name passed to `xcrun --sdk`. Corresponds to undocumented Xcode
|
||||
/// SUPPORTED_PLATFORMS values.
|
||||
|
||||
Reference in New Issue
Block a user