Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The iOS 13.0 simulator runtime is not available

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:

enter image description here

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
like image 827
Benjamin Wen Avatar asked Jun 05 '19 14:06

Benjamin Wen


2 Answers

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.

like image 177
russbishop Avatar answered Oct 11 '22 13:10

russbishop


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. ;]

like image 28
Benjamin Wen Avatar answered Oct 11 '22 14:10

Benjamin Wen