Increase Xcode minimum version to 14 (#125639)
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.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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<Map<String, String>> getBuildSettings(
|
||||
|
||||
Reference in New Issue
Block a user