From 6b73885e2df2998e9d06583492cedb2f3a14e8af Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Thu, 27 Apr 2023 16:17:56 -0700 Subject: [PATCH] Increase Xcode minimum version to 14 (#125639) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Looks like CocoaPods 1.12.1 is incompatible with < Xcode 14 due to https://github.com/CocoaPods/CocoaPods/pull/11828 (see https://github.com/flutter/flutter/issues/123890 for context). Bump the minimum Xcode version allowed by tooling to 14, released September 2022. ``` [!] Xcode - develop for iOS and macOS (Xcode 13.4) ✗ Flutter requires Xcode 14 or higher. Download the latest version or update via the Mac App Store. ``` Fixes https://github.com/flutter/flutter/issues/125286. Previous bump at #97746. --- packages/flutter_tools/lib/src/macos/xcode.dart | 2 +- .../test/general.shard/macos/xcode_test.dart | 10 +++++----- .../test/general.shard/macos/xcode_validator_test.dart | 2 +- packages/flutter_tools/test/src/context.dart | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/flutter_tools/lib/src/macos/xcode.dart b/packages/flutter_tools/lib/src/macos/xcode.dart index ce5122db4830..ff0b89e7e7f9 100644 --- a/packages/flutter_tools/lib/src/macos/xcode.dart +++ b/packages/flutter_tools/lib/src/macos/xcode.dart @@ -18,7 +18,7 @@ import '../base/version.dart'; import '../build_info.dart'; import '../ios/xcodeproj.dart'; -Version get xcodeRequiredVersion => Version(13, null, null); +Version get xcodeRequiredVersion => Version(14, null, null); /// Diverging this number from the minimum required version will provide a doctor /// warning, not error, that users should upgrade Xcode. diff --git a/packages/flutter_tools/test/general.shard/macos/xcode_test.dart b/packages/flutter_tools/test/general.shard/macos/xcode_test.dart index 7158d612fcce..b7fd7ff9c116 100644 --- a/packages/flutter_tools/test/general.shard/macos/xcode_test.dart +++ b/packages/flutter_tools/test/general.shard/macos/xcode_test.dart @@ -155,7 +155,7 @@ void main() { testWithoutContext('version checks pass when version meets minimum', () { xcodeProjectInterpreter.isInstalled = true; - xcodeProjectInterpreter.version = Version(13, null, null); + xcodeProjectInterpreter.version = Version(14, null, null); expect(xcode.isRequiredVersionSatisfactory, isTrue); expect(xcode.isRecommendedVersionSatisfactory, isTrue); @@ -163,7 +163,7 @@ void main() { testWithoutContext('version checks pass when major version exceeds minimum', () { xcodeProjectInterpreter.isInstalled = true; - xcodeProjectInterpreter.version = Version(14, 0, 0); + xcodeProjectInterpreter.version = Version(15, 0, 0); expect(xcode.isRequiredVersionSatisfactory, isTrue); expect(xcode.isRecommendedVersionSatisfactory, isTrue); @@ -171,7 +171,7 @@ void main() { testWithoutContext('version checks pass when minor version exceeds minimum', () { xcodeProjectInterpreter.isInstalled = true; - xcodeProjectInterpreter.version = Version(13, 3, 0); + xcodeProjectInterpreter.version = Version(14, 3, 0); expect(xcode.isRequiredVersionSatisfactory, isTrue); expect(xcode.isRecommendedVersionSatisfactory, isTrue); @@ -179,7 +179,7 @@ void main() { testWithoutContext('version checks pass when patch version exceeds minimum', () { xcodeProjectInterpreter.isInstalled = true; - xcodeProjectInterpreter.version = Version(13, 0, 2); + xcodeProjectInterpreter.version = Version(14, 0, 2); expect(xcode.isRequiredVersionSatisfactory, isTrue); expect(xcode.isRecommendedVersionSatisfactory, isTrue); @@ -202,7 +202,7 @@ void main() { testWithoutContext('isInstalledAndMeetsVersionCheck is true when macOS and installed and version is satisfied', () { xcodeProjectInterpreter.isInstalled = true; - xcodeProjectInterpreter.version = Version(13, null, null); + xcodeProjectInterpreter.version = Version(14, null, null); expect(xcode.isInstalledAndMeetsVersionCheck, isTrue); expect(fakeProcessManager, hasNoRemainingExpectations); diff --git a/packages/flutter_tools/test/general.shard/macos/xcode_validator_test.dart b/packages/flutter_tools/test/general.shard/macos/xcode_validator_test.dart index ea66b9f88289..bb6668e7ace6 100644 --- a/packages/flutter_tools/test/general.shard/macos/xcode_validator_test.dart +++ b/packages/flutter_tools/test/general.shard/macos/xcode_validator_test.dart @@ -56,7 +56,7 @@ void main() { final ValidationResult result = await validator.validate(); expect(result.type, ValidationType.partial); expect(result.messages.last.type, ValidationMessageType.error); - expect(result.messages.last.message, contains('Flutter requires Xcode 13 or higher')); + expect(result.messages.last.message, contains('Flutter requires Xcode 14 or higher')); }); testWithoutContext('Emits partial status when Xcode below recommended version', () async { diff --git a/packages/flutter_tools/test/src/context.dart b/packages/flutter_tools/test/src/context.dart index d70c3a44d515..bdae4fba3cd3 100644 --- a/packages/flutter_tools/test/src/context.dart +++ b/packages/flutter_tools/test/src/context.dart @@ -326,13 +326,13 @@ class FakeXcodeProjectInterpreter implements XcodeProjectInterpreter { bool get isInstalled => true; @override - String get versionText => 'Xcode 13'; + String get versionText => 'Xcode 14'; @override - Version get version => Version(13, null, null); + Version get version => Version(14, null, null); @override - String get build => '13C100'; + String get build => '14A309'; @override Future> getBuildSettings(