From f4f81e9ac76ef795660656fdc43cae7fe263900e Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Fri, 23 Jun 2017 14:07:01 -0700 Subject: [PATCH] Require Xcode >= 8.0 for iOS development (#10932) This allows us to take advantage of improved command-line tooling (e.g., improvements in device listing in Instruments). Now that the engine is built with Xcode 8 and the framework is tested against Xcode 8, this reduces the set of configurations we need to support to allow us to focus on the supported ones: Xcode 8 and Xcode 9. --- packages/flutter_tools/lib/src/ios/mac.dart | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/flutter_tools/lib/src/ios/mac.dart b/packages/flutter_tools/lib/src/ios/mac.dart index c18116718a..dba3a05e2e 100644 --- a/packages/flutter_tools/lib/src/ios/mac.dart +++ b/packages/flutter_tools/lib/src/ios/mac.dart @@ -25,7 +25,7 @@ import 'code_signing.dart'; import 'ios_workflow.dart'; import 'xcodeproj.dart'; -const int kXcodeRequiredVersionMajor = 7; +const int kXcodeRequiredVersionMajor = 8; const int kXcodeRequiredVersionMinor = 0; // The Python `six` module is a dependency for Xcode builds, and installed by @@ -294,8 +294,9 @@ Future diagnoseXcodeBuildFailure(XcodeBuildResult result, BuildableIOSApp } if (result.xcodeBuildExecution != null && result.xcodeBuildExecution.buildForPhysicalDevice && - // Make sure the user has specified at least the DEVELOPMENT_TEAM (for automatic Xcode 8) - // signing or the PROVISIONING_PROFILE (for manual signing or Xcode 7). + // Make sure the user has specified one of: + // DEVELOPMENT_TEAM (automatic signing) + // PROVISIONING_PROFILE (manual signing) !(app.buildSettings?.containsKey('DEVELOPMENT_TEAM')) == true || app.buildSettings?.containsKey('PROVISIONING_PROFILE') == true) { printError(noDevelopmentTeamInstruction, emphasis: true); return; @@ -355,7 +356,7 @@ class XcodeBuildExecution { } final RegExp _xcodeVersionRegExp = new RegExp(r'Xcode (\d+)\..*'); -final String _xcodeRequirement = 'Xcode 7.0 or greater is required to develop for iOS.'; +final String _xcodeRequirement = 'Xcode $kXcodeRequiredVersionMajor.$kXcodeRequiredVersionMinor or greater is required to develop for iOS.'; bool _checkXcodeVersion() { if (!platform.isMacOS) @@ -363,7 +364,7 @@ bool _checkXcodeVersion() { try { final String version = runCheckedSync(['xcodebuild', '-version']); final Match match = _xcodeVersionRegExp.firstMatch(version); - if (int.parse(match[1]) < 7) { + if (int.parse(match[1]) < kXcodeRequiredVersionMajor) { printError('Found "${match[0]}". $_xcodeRequirement'); return false; }