Skip to content

Commit 6b73885

Browse files
authored
Increase Xcode minimum version to 14 (#125639)
Looks like CocoaPods 1.12.1 is incompatible with < Xcode 14 due to CocoaPods/CocoaPods#11828 (see flutter/flutter#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 flutter/flutter#125286. Previous bump at #97746.
1 parent eba2a52 commit 6b73885

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

packages/flutter_tools/lib/src/macos/xcode.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import '../base/version.dart';
1818
import '../build_info.dart';
1919
import '../ios/xcodeproj.dart';
2020

21-
Version get xcodeRequiredVersion => Version(13, null, null);
21+
Version get xcodeRequiredVersion => Version(14, null, null);
2222

2323
/// Diverging this number from the minimum required version will provide a doctor
2424
/// warning, not error, that users should upgrade Xcode.

packages/flutter_tools/test/general.shard/macos/xcode_test.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,31 +155,31 @@ void main() {
155155

156156
testWithoutContext('version checks pass when version meets minimum', () {
157157
xcodeProjectInterpreter.isInstalled = true;
158-
xcodeProjectInterpreter.version = Version(13, null, null);
158+
xcodeProjectInterpreter.version = Version(14, null, null);
159159

160160
expect(xcode.isRequiredVersionSatisfactory, isTrue);
161161
expect(xcode.isRecommendedVersionSatisfactory, isTrue);
162162
});
163163

164164
testWithoutContext('version checks pass when major version exceeds minimum', () {
165165
xcodeProjectInterpreter.isInstalled = true;
166-
xcodeProjectInterpreter.version = Version(14, 0, 0);
166+
xcodeProjectInterpreter.version = Version(15, 0, 0);
167167

168168
expect(xcode.isRequiredVersionSatisfactory, isTrue);
169169
expect(xcode.isRecommendedVersionSatisfactory, isTrue);
170170
});
171171

172172
testWithoutContext('version checks pass when minor version exceeds minimum', () {
173173
xcodeProjectInterpreter.isInstalled = true;
174-
xcodeProjectInterpreter.version = Version(13, 3, 0);
174+
xcodeProjectInterpreter.version = Version(14, 3, 0);
175175

176176
expect(xcode.isRequiredVersionSatisfactory, isTrue);
177177
expect(xcode.isRecommendedVersionSatisfactory, isTrue);
178178
});
179179

180180
testWithoutContext('version checks pass when patch version exceeds minimum', () {
181181
xcodeProjectInterpreter.isInstalled = true;
182-
xcodeProjectInterpreter.version = Version(13, 0, 2);
182+
xcodeProjectInterpreter.version = Version(14, 0, 2);
183183

184184
expect(xcode.isRequiredVersionSatisfactory, isTrue);
185185
expect(xcode.isRecommendedVersionSatisfactory, isTrue);
@@ -202,7 +202,7 @@ void main() {
202202

203203
testWithoutContext('isInstalledAndMeetsVersionCheck is true when macOS and installed and version is satisfied', () {
204204
xcodeProjectInterpreter.isInstalled = true;
205-
xcodeProjectInterpreter.version = Version(13, null, null);
205+
xcodeProjectInterpreter.version = Version(14, null, null);
206206

207207
expect(xcode.isInstalledAndMeetsVersionCheck, isTrue);
208208
expect(fakeProcessManager, hasNoRemainingExpectations);

packages/flutter_tools/test/general.shard/macos/xcode_validator_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void main() {
5656
final ValidationResult result = await validator.validate();
5757
expect(result.type, ValidationType.partial);
5858
expect(result.messages.last.type, ValidationMessageType.error);
59-
expect(result.messages.last.message, contains('Flutter requires Xcode 13 or higher'));
59+
expect(result.messages.last.message, contains('Flutter requires Xcode 14 or higher'));
6060
});
6161

6262
testWithoutContext('Emits partial status when Xcode below recommended version', () async {

packages/flutter_tools/test/src/context.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,13 +326,13 @@ class FakeXcodeProjectInterpreter implements XcodeProjectInterpreter {
326326
bool get isInstalled => true;
327327

328328
@override
329-
String get versionText => 'Xcode 13';
329+
String get versionText => 'Xcode 14';
330330

331331
@override
332-
Version get version => Version(13, null, null);
332+
Version get version => Version(14, null, null);
333333

334334
@override
335-
String get build => '13C100';
335+
String get build => '14A309';
336336

337337
@override
338338
Future<Map<String, String>> getBuildSettings(

0 commit comments

Comments
 (0)