The iOS 13.0 simulator runtime is not available

北慕城南 提交于 2021-02-20 06:25:24

问题


I installed the Xcode-11-beta along with macOS 10.15 beta. At first I can play with SwiftUI preview normally. But after I tried to move the Xcode-beta from the ~/Downloads directory where I initially installed it, to /Applications, the preview can't work. Here is the error:

So I moved it back to ~/Downloads, hoping things will go well as before. But it gives the same error.

After this, I reinstalled it and I still got this error. Can anyone help me fix it?

The content of diagnostics report is this:

== DATE:

Wednesday, June 5, 2019 at 10:25:46 PM China Standard Time



== PENDING U

    PDATE REASONS:





== PREVIEW UPDATE ERROR:

    unexpected error occurred

    Error Domain=com.apple.CoreSimulator.SimError Code=161 "The iOS 13.0 simulator runtime is not available." UserInfo={NSLocalizedRecoverySuggestion=Download the iOS 13.0 simulator runtime from the Components section in Xcode's Preferences., NSLocalizedFailureReason=runtime path not found, NSLocalizedDescription=The iOS 13.0 simulator runtime is not available.}



== VERSION INFO:

    Tools: 11M336w

    OS:    19A471t



== ENVIRONMENT:

    [x] In valid workspace
    [x] Project is using the new build system
        Previews are available for targets that are built with the new build system. Change your project to use the new build system.
    [x] Selected scheme (Landmarks)
        Select a scheme from the scheme picker in the toolbar
    [x] Selected run destination (iPhone 8)
        Select a run destination from the scheme picker in the toolbar
    [x] Have workspace arena
        Try quitting and reopening your workspace
    [x] Have build arena
        Try quitting and reopening your workspace
    [x] Open file has supported build settings

回答1:


CoreSimulator does not currently like simruntime bundles being moved out from under it. By launching from ~/Downloads it became aware of the iOS.simruntime for iOS 13, then you moved it.

In this one specific case you can workaround the problem by killing com.apple.CoreSimulator.CoreSimulatorService.




回答2:


Weird thing is I wake up in the morning and start my computer, the Canvas and the iOS 13.0 Simulator can work now.

So, I guess the solution to this may be just a brutal restart. ;]




回答3:


The XCode 11 upgrade breaks simulators in a weird way that I don't fully understand - nothing I tried would work to get simulators to run after the upgrade, and I couldn't find much in the way of clear answers as to why that was the case, but the following two commands fixed the issue for me:

  • sudo xcrun simctl shutdown all
  • sudo xcrun simctl erase all


来源:https://stackoverflow.com/questions/56462769/the-ios-13-0-simulator-runtime-is-not-available

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!