Skip to content

Conversation

@jmagman
Copy link
Member

@jmagman jmagman commented Jan 12, 2021

Add concept of minimum recommended Xcode version (analogous to minimum recommended CocoaPods version) to give users warning that they should start upgrading their environments.

Rename isVersionSatisfactory -> isRequiredVersionSatisfactory for clarity.

Set minimum recommended to Xcode 12.0.1 (released 9/29/20).

Fixes #73801

flutter doctor:
Screen Shot 2021-01-12 at 1 10 13 PM
flutter doctor -v:
Screen Shot 2021-01-12 at 1 10 33 PM

@jmagman jmagman added the t: xcode "xcodebuild" on iOS and general Xcode project management label Jan 12, 2021
@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jan 12, 2021
@google-cla google-cla bot added the cla: yes label Jan 12, 2021
@jmagman jmagman self-assigned this Jan 12, 2021
// Messages used in XcodeValidator
String xcodeLocation(String location) => 'Xcode at $location';
String xcodeOutdated(int versionMajor, int versionMinor, int versionPatch) =>
'Flutter requires a minimum Xcode version of $versionMajor.$versionMinor.$versionPatch.\n'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured there's no point mentioning the minimum required if they are out of date: just download the recommended one.

const int kXcodeRequiredVersionMinor = 0;
const int kXcodeRequiredVersionPatch = 0;

const int kXcodeRecommendedVersionMajor = 12;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we replace these with our existing Version class?

class Version implements Comparable<Version> {

Then you can just if (currentVersion >= recommendedVersion) { ... }

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, done.

}

bool get _xcodeVersionSupportsScreenshot {
return _xcode.majorVersion > 8 || (_xcode.majorVersion == 8 && _xcode.minorVersion >= 2);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed we don't need this anymore, the minimum version has been > 8 for awhile.

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jmagman jmagman merged commit 7c75c01 into flutter:master Jan 13, 2021
@jmagman jmagman deleted the xcode-recommended branch January 13, 2021 03:01
pcsosinski pushed a commit to pcsosinski/flutter that referenced this pull request Jan 14, 2021
pcsosinski pushed a commit that referenced this pull request Jan 14, 2021
* Update engine hash to 1.25.0-8.3.pre

* Fix dateAndTime and time modes of CupertinoDatePicker. (#73276)

* Fix cupertino icons mapping which was misaligned by 1 (#72384)

* Add recommended Xcode version to doctor (#73808)

* Remove unnecessary Xcode version check

Co-authored-by: YeungKC <[email protected]>
Co-authored-by: xster <[email protected]>
Co-authored-by: Jenn Magder <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t: xcode "xcodebuild" on iOS and general Xcode project management tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add minimum recommended version of Xcode to doctor

2 participants