Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 12. Unable to lookup with an unavailable runtime

Unable to boot a simulator in Xcode 12.0 beta. The simulator is not running only if chosen SwiftUI Project. Automatic preview is not working as well.

enter image description here

Simulator is running on iOS 14.0.

Any suggestions?

like image 500
Eugene Avatar asked Jun 23 '20 07:06

Eugene


Video Answer


1 Answers

I had the same issue and I just found a solution.

TL;DR: Quit all running sim and try again, if it still doesn't work, delete the sim and re-add it.

Actually the detailed message is misleading (which you see by clicking "Details"), it shows:

Details

Unable to lookup with an unavailable runtime. Domain: com.apple.CoreSimulator.SimError Code: 405 -- The iOS 14.0 simulator runtime is not available. Domain: com.apple.CoreSimulator.SimError Code: 401 Failure Reason: runtime path not found Recovery Suggestion: Download the iOS 14.0 simulator runtime from the Components section in Xcode's Preferences. --

System Information

macOS Version 10.15.5 (Build 19F101) Xcode 12.0 (17177)

At least for me that is what the detailed message says... It suggests that I do not have iOS 14 simulator installed.

Even more confusing was that when I opened Xcode Settings and clicked to Components -> Simulator I do not see iOS 14 in the list: enter image description here

And looking at the existing simulator list next to my Schema it does not explicitly say that the OS of these devices are running iOS 14. enter image description here

What fixed it for me was to:

  1. Make sure to quit any potentially running simulators. This step might be enough? I didn't actually try, I just went straight a head to step 2...
  2. Delete a simulator using the "Devices and Simulator Window" - which you can open with shortcut CMD+SHIFT+2 - by right clicking the sim and select "Delete". I used iPhone SE (2nd generation)... After deleting it, then
  3. Re-add it, by clicking the plus button in the bottom left corner of the same "Devices and Simulator Window", chose the wanted devices, probably the same you just deleted, and make sure "OS version" is set to 14.
  4. Try running again and it works!
like image 66
Sajjon Avatar answered Sep 19 '22 08:09

Sajjon