Skip to content

Flutter won't run until iOS 17 simulator is installed with Xcode 15 #129558

Closed

Description

@vashworth

If you upgrade to Xcode 15 and you haven’t downloaded iOS 17 simulator, you can’t run an app even if you have older and compatible simulators available or a physical device

You get the following error:

xcodebuild: error: Unable to find a destination matching the provided destination specifier:
               		{ id:B1234A5C-67B8-901D-B2CB-FE34F56BDE78 }

               	Ineligible destinations for the "Runner" scheme:
               		{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device, error:iOS 17.0 is not installed. To use with Xcode, first download and install the platform }

Latest iOS simulator is no longer included in Xcode download as of Xcode 15. You have to download the iOS 17 simulator separately. On Xcode launch, it should prompt you to install it. However, Flutter setup guide does not tell you to open Xcode.


Tasks:

Activity

  1. added
    platform-iosiOS applications specifically
    toolAffects the "flutter" command-line tool. See also t: labels.
    t: xcode"xcodebuild" on iOS and general Xcode project management
    e: OS-version specificAffects only some versions of the relevant operating system
    on Jun 26, 2023
  2. vashworth commented on Jun 26, 2023

    @vashworth
    ContributorAuthor

    This is also going to be an issue when we eventually put Xcode 15 in our CI system. There are some command line tools we can take advantage of: https://developer.apple.com/documentation/xcode/installing-additional-simulator-runtimes#Install-and-manage-Simulator-runtimes-from-the-command-line

    However, not sure if we'll want to use a command to download the simulator or manual uploads to CIPD like we do for Xcode.

    cc @keyonghan

  3. changed the title [-]Flutter won't run until iOS 17 is installed with Xcode 15[/-] [+]Flutter won't run until iOS 17 is not installed with Xcode 15[/+] on Jun 26, 2023
  4. changed the title [-]Flutter won't run until iOS 17 is not installed with Xcode 15[/-] [+]Flutter won't run until iOS 17 is installed with Xcode 15[/+] on Jun 26, 2023
  5. vashworth commented on Jun 26, 2023

    @vashworth
    ContributorAuthor

    I think at the least we need to update the documentation, parse error xcodebuild message and give a more guided and understandable error message, and probably add a check to flutter doctor.

    Taking a look at how it's done for Android, in our documentation, we guide them to setup an emulator through Android Studio: https://docs.flutter.dev/get-started/install/macos#set-up-the-android-emulator
    We also have a command line tool to launch or create an emulator: flutter emulators

    We could potentially automate the downloading and installing of simulators. Also, we could potentially have a flutter command to create/launch an simulator (same as android). These are lesser priorities imo.

    cc @christopherfujino
    cc @leighajarett

  6. changed the title [-]Flutter won't run until iOS 17 is installed with Xcode 15[/-] [+]Flutter won't run until iOS 17 simulator is installed with Xcode 15[/+] on Jun 26, 2023
  7. keyonghan commented on Jun 26, 2023

    @keyonghan
    Contributor

    However, not sure if we'll want to use a command to download the simulator or manual uploads to CIPD like we do for Xcode.

    We are uploading/downloading simulators via cipd: https://chrome-infra-packages.appspot.com/p/flutter_internal/ios/xcode/ios_runtime/+/

  8. self-assigned this
    on Jul 7, 2023
  9. vashworth commented on Jul 10, 2023

    @vashworth
    ContributorAuthor

    Okay so in previous versions of Xcode, the simulator could be found in this path /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime so when we upload Xcode, it also uploads the simulator runtime.

    However, in Xcode 15, the iOS.simruntime is no longer located there and is instead found in /Library/Developer/CoreSimulator/Volumes/iOS_21A5268h/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.0.simruntime (after running xcrun simctl runtime add "~/Downloads/iOS_17_beta_3_Simulator_Runtime.dmg").

    I tried manually copying iOS 17.0.simruntime into the /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes directory and Xcode accepted it.

    So I think that will need to be a new prerequisite to Xcode CIPD uploads.

    I'll update our documentation to reflect this.

    fyi @keyonghan @cyanglaz

  10. added
    P1High-priority issues at the top of the work list
    on Jul 31, 2023
  11. vashworth commented on Sep 28, 2023

    @vashworth
    ContributorAuthor

    All subtasks are complete. Closing.

  12. github-actions commented on Oct 12, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  13. locked as resolved and limited conversation to collaborators on Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work liste: OS-version specificAffects only some versions of the relevant operating systemplatform-iosiOS applications specificallyt: xcode"xcodebuild" on iOS and general Xcode project managementteam-iosOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions