Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tool] connected IOS devices not visible on old version of Xcode, "Flutter requires Xcode 13 or higher" #104155

Open
lel101 opened this issue May 19, 2022 · 21 comments
Labels
P3 Issues that are less important to the Flutter project platform-ios iOS applications specifically t: flutter doctor Problem related to the "flutter doctor" tool team-ios Owned by iOS platform team tool Affects the "flutter" command-line tool. See also t: labels. triaged-ios Triaged by iOS platform team

Comments

@lel101
Copy link

lel101 commented May 19, 2022

Sorry for the trouble.

It work's fine in flutter version 2.10.5 stable, but when I upgrade my flutter environment to 3 this problem occur, even though the emulator is already open.

But when I will downgrade the flutter version to 2.10.5 it will work again.

Btw I'm only using Xcode 12.4 because I have an old mac and I can't upgrade to Xcode 13 or higher.

Screen Shot 2022-05-19 at 3 08 48 PM
Screen Shot 2022-05-19 at 3 12 45 PM

@maheshmnj maheshmnj added the in triage Presently being triaged by the triage team label May 19, 2022
@maheshmnj
Copy link
Member

maheshmnj commented May 19, 2022

Hi @lel101, Thanks for filing the issue. Can you please share the output of flutter doctor -v on both stable 2.10 .5 (where it works ) and stable 3.0 (where it doesn't)? Do also share the output of flutter devices on stable 3.0

@maheshmnj maheshmnj added waiting for PR to land (fixed) A fix is in flight waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds and removed waiting for PR to land (fixed) A fix is in flight labels May 19, 2022
@maheshmnj maheshmnj changed the title Cannot connect to IOS emulator using VS code. Cannot connect to IOS Simulator using VS code. May 19, 2022
@lel101
Copy link
Author

lel101 commented May 20, 2022

@maheshmnj Thank you for your response

stable 3.0.1
-- flutter doctor -v

[✓] Flutter (Channel stable, 3.0.1, on Mac OS X 10.15.7 19H1922 darwin-x64, locale en-PH)
    • Flutter version 3.0.1 at /Users/macbook/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision fb57da5f94 (5 hours ago), 2022-05-19 15:50:29 -0700
    • Engine revision caaafc5604
    • Dart version 2.17.1
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/macbook/Library/Android/sdk
    • Platform android-32, build-tools 32.1.0-rc1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 12.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    ✗ Flutter requires Xcode 13 or higher.
      Download the latest version or update via the Mac App Store.
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)

[✓] VS Code (version 1.67.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.40.0

[✓] VS Code (version 1.66.2)
    • VS Code at /Users/macbook/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.40.0

[✓] VS Code (version 1.66.2)
    • VS Code at /Users/macbook/Downloads/Visual Studio Code 2.app/Contents
    • Flutter extension version 3.40.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • Mac OS X 10.15.7 19H1922 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 101.0.4951.64

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

-- flutter devices

2 connected devices:

macOS (desktop) • macos  • darwin-x64     • Mac OS X 10.15.7 19H1922 darwin-x64
Chrome (web)    • chrome • web-javascript • Google Chrome 101.0.4951.64

stable 2.10.5
-- flutter doctor -v

[✓] Flutter (Channel stable, 2.10.5, on Mac OS X 10.15.7 19H1922 darwin-x64, locale en-PH)
    • Flutter version 2.10.5 at /Users/macbook/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5464c5bac7 (4 weeks ago), 2022-04-18 09:55:37 -0700
    • Engine revision 57d3bac3dd
    • Dart version 2.16.2
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/macbook/Library/Android/sdk
    • Platform android-32, build-tools 32.1.0-rc1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 12.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    ! Flutter recommends a minimum Xcode version of 13.
      Download the latest version or update via the Mac App Store.
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)

[✓] VS Code (version 1.67.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.40.0

[✓] VS Code (version 1.66.2)
    • VS Code at /Users/macbook/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.40.0

[✓] VS Code (version 1.66.2)
    • VS Code at /Users/macbook/Downloads/Visual Studio Code 2.app/Contents
    • Flutter extension version 3.40.0

[✓] Connected device (2 available)
    • Custom_Simulator (mobile) • 23F99BB7-0559-4832-8072-091C76495A88 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
    • Chrome (web)              • chrome                               • web-javascript • Google Chrome 101.0.4951.64

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

-- flutter devices

2 connected devices:

Custom_Simulator (mobile) • 23F99BB7-0559-4832-8072-091C76495A88 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-4
(simulator)
Chrome (web)              • chrome                               • web-javascript • Google Chrome 101.0.4951.64

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 20, 2022
@maheshmnj
Copy link
Member

Thanks for the info @lel101,

✗ Flutter requires Xcode 13 or higher.

I believe you would need to upgrade xcode to 13, However, you can try this solution #41006 (comment) and see if it helps fix the issue ?

@maheshmnj maheshmnj added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 20, 2022
@lel101
Copy link
Author

lel101 commented May 20, 2022

@maheshmnj
Thanks for the response,

I believe you would need to upgrade xcode to 13

I'm using an old mac, that's why I cannot upgrade my xcode :(

However, you can try this solution #41006 (comment) and see if it helps fix the issue ?

I will check this one thanks!

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 20, 2022
@maheshmnj maheshmnj added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 20, 2022
@AbiMulLyA
Copy link

Thanks for the info @lel101,

✗ Flutter requires Xcode 13 or higher.

I believe you would need to upgrade xcode to 13, However, you can try this solution #41006 (comment) and see if it helps fix the issue ?

I got same error too.. i have tried this.. but still not work in flutter 3. please confirm @lel101 have u tried it?

@lel101
Copy link
Author

lel101 commented May 20, 2022

@AbiMulLyA
Sorry but still not working. Do you have same setup with me ?

What version of xcode you are using ?

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 20, 2022
@AbiMulLyA
Copy link

@lel101 i'm using xcode 12.4 and currently on flutter 3.0.1

@lel101
Copy link
Author

lel101 commented May 20, 2022

@AbiMulLyA
Can you try upgrade your xcode to 13 and test it ?
Sorry I wish I could try it here but my laptop is old and I can't upgrade it.

@AbiMulLyA
Copy link

@lel101 sorry i'm using old mac too. I can't update to xcode 13 😆

@lel101
Copy link
Author

lel101 commented May 20, 2022

@maheshmnj
Sorry for the trouble,

Do you have any work around for laptop that uses xcode below 13 ?

@AbiMulLyA
Copy link

@maheshmnj is there another solution for this?

@maheshmnj
Copy link
Member

Thanks for the info @lel101, I am not sure of any other solution to why the ios devices are not visible, The xcode version seems to be the cause of the issue. Labeling this issue for further insights from the team.

@maheshmnj maheshmnj added platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. t: flutter doctor Problem related to the "flutter doctor" tool and removed in triage Presently being triaged by the triage team labels May 20, 2022
@maheshmnj maheshmnj changed the title Cannot connect to IOS Simulator using VS code. [tool] connected IOS devices not visible in flutter 3 May 20, 2022
@maheshmnj
Copy link
Member

cc: @christopherfujino

@jmagman jmagman changed the title [tool] connected IOS devices not visible in flutter 3 [tool] connected IOS devices not visible on old version of Xcode, "Flutter requires Xcode 13 or higher" May 20, 2022
@jmagman
Copy link
Member

jmagman commented May 20, 2022

I was just thinking about this in #103844 (comment)

We could change the Xcode version logic from being so aggressive--only check if it's installed, then try to build or get devices or whatever, and only check and report the version if that fails. The last Xcode bump, for example, was because we need bitcode-enabled apps (usually add-to-app) to be on the same or newer version of clang than the one the engine is on. But for most of our users that's not relevant (bitcode is off in the template). Sometimes it just won't build on an old toolchain, at which point we can report that the version is too old.

@clytras
Copy link

clytras commented May 22, 2022

App Store does not accept archives built with Xcode < 13 anymore. I have a Mac Mini late 2012 and it doesn't support macOS Monterey. I got Monterey installed using the OpenCore Legacy Patcher and then I was able to install Xcode 13 without issues. You can check supported models here.

@jmagman
Copy link
Member

jmagman commented May 23, 2022

That's one of the reasons we're enforcing it so strictly on flutter build/flutter run.

Ideally everyone should be on the latest and greatest version of Xcode with the newest SDKs. In practice though it can be really difficult to, say, upgrade your entire CI suite hardware, when it only takes one new machine (or deployment service) to actually archive and publish. We could allow looser build/run requirements, but be stricter for flutter build ipa when developers are presumably ready to ship their app.

@AbiMulLyA
Copy link

@lel101 could u run your project on iPhone real device with current flutter n xcode version?

@christopherfujino christopherfujino added the P3 Issues that are less important to the Flutter project label Jun 7, 2022
@flutter-triage-bot flutter-triage-bot bot added multiteam-retriage-candidate team-ios Owned by iOS platform team triaged-ios Triaged by iOS platform team labels Jul 8, 2023
@dam-ease
Copy link

dam-ease commented Sep 7, 2023

On the latest versions, Flutter requires Xcode 14 or higher as included in the 3.13.0 release note.

Running flutter doctor -v with XCcde 13, gives:

[✓] Flutter (Channel stable, 3.13.2, on macOS 11.7.9 20G1426 darwin-x64, locale pl-PL)
    • Flutter version 3.13.2 on channel stable at /Users/<user_name>/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ff5b5b5fa6 (13 days ago), 2023-08-24 08:12:28 -0500
    • Engine revision b20183e040
    • Dart version 3.1.0
    • DevTools version 2.25.0

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[!] Xcode - develop for iOS and macOS (Xcode 13.0)
    • Xcode at /Users/<user_name>/Downloads/Xcode 2.app/Contents/Developer
    • Build 13A233
    ✗ Flutter requires Xcode 14 or higher.
      Download the latest version or update via the Mac App Store.
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[✓] VS Code (version 1.81.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.72.0

[✓] Connected device (1 available)
    • macOS (desktop) • macos • darwin-x64 • macOS 11.7.9 20G1426 darwin-x64

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 4 categories.

/cc @christopherfujino

@christopherfujino
Copy link
Member

@dam-ease why are you tagging me?

@dam-ease
Copy link

dam-ease commented Sep 8, 2023

I saw a similar issue recently on the new Flutter version and error message, so I tagged you because I saw you add a priority label and thought you might want to follow up on this issue by keeping up to date with the latest information. Apologies if my assumption is incorrect.

@christopherfujino
Copy link
Member

I saw a similar issue recently on the new Flutter version and error message, so I tagged you because I saw you add a priority label and thought you might want to follow up on this issue by keeping up to date with the latest information. Apologies if my assumption is incorrect.

this approach does not scale well to the number of open issues that are labelled tool: https://github.com/flutter/flutter/issues?q=is%3Aopen+is%3Aissue+label%3Atool. Per our Issue Hygiene section of the wiki, I would recommend adding a thumbs up reaction to the top level comment of the issue in order to raise visibility of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Issues that are less important to the Flutter project platform-ios iOS applications specifically t: flutter doctor Problem related to the "flutter doctor" tool team-ios Owned by iOS platform team tool Affects the "flutter" command-line tool. See also t: labels. triaged-ios Triaged by iOS platform team
Projects
None yet
Development

No branches or pull requests

8 participants