63

I have just been (involuntarily) upgraded to Xcode 10.3 (10G8). I'm getting the following error:

/Users/hgm/XCode/Gnosys/TGuide/TGPrep/Assets.xcassets:-1: Failed to find a suitable device for the type IBSimDeviceTypeiPad2x (com.apple.dt.Xcode.IBSimDeviceType.iPad-2x) with runtime iOS 12.4 (12.4 - 16G73) - com.apple.CoreSimulator.SimRuntime.iOS-12-4

It appears that the upgrade to Xcode is incomplete.

How do I ensure a complete installation, if this is the problem?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
hgm
  • 725
  • 1
  • 5
  • 6

5 Answers5

79

Restarting your computer/macOS will resolve the issue.

Daniel Storm
  • 18,301
  • 9
  • 84
  • 152
Admas.Cheng
  • 757
  • 4
  • 5
  • 36
    I can't believe we have finally resolved to windows techniques... this worked – Jan Jul 23 '19 at 15:35
  • 3
    Yes, sadly enough, all it took was a restart on my end as well. I restarted Xcode several times but that didn't work. I had to do a reboot and then it just worked. – Shawn Jul 23 '19 at 18:28
  • 2
    Yep, lost 1hr wondering what the problem was, a restart solved it. – jpcarreira Jul 25 '19 at 12:17
  • If you have the time to spend, I recommend learning how Xcode works under the hood and figuring out which processes need to be killed. Still would be nice if Xcode did this cleanup itself. – Michael Ozeryansky Jul 27 '19 at 03:48
  • 1
    For me it was enough to quit Xcode and then kill the simulator processes as suggsted by 刘海东 : sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService – Rolf Staflin Jul 29 '19 at 12:57
  • 1
    _We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed._ – lofihelsinki Aug 15 '19 at 13:17
  • Nope, it did't work. The answer from 刘海东 did however. – turingtested Aug 29 '19 at 11:45
  • Restarting like Windows is incorrect and very immature advice. It shows lack of knowledge and experience with a Mac system. Plus restarting a system can have many other side effects which are not desirable. You don't restart a UNIX like system unless updating the kernel or complete OS. Real answer is what 刘海东 has provided, which is basically: sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService – zeeshan Sep 12 '19 at 14:28
49

Kill all simulator processes

$ sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService

Set the correct Xcode path

$ sudo xcode-select -s  /Applications/Xcode.app/Contents/Developer

If that doesn’t work, reset all simulators

$ xcrun simctl erase all
grg
  • 5,023
  • 3
  • 34
  • 50
刘海东
  • 491
  • 3
  • 2
31

First, try to close any running Simulator and Xcode instances. Then, restart CoreSimulatorService.

sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService

You should now be able to build and run your app without any issues.

If not, another issue that you might encounter is that the Xcode upgrade deleted some versions of iOS. You might need to download an iOS Simulator from Xcode. I upgraded from Xcode 10.2, to 10.3, and no simulator was available.

Go to Xcode -> Preferences, and click on Components.

From there you will be able to download a version of iOS.

enter image description here

After the download is complete, close any running Simulator and Xcode instances again and try restarting CoreSimulatorService.

sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
Tim Groeneveld
  • 8,739
  • 3
  • 44
  • 60
3
  • Delete Xcode in Launchpad.
  • Clean ~/Library/Developer folder.
  • Open the App Store, the Xcode APP button will be "Open".
  • Open it.
  • it worked fine or me.

  • I have cleaned Xcode folder and project, but it did not work.

1

I had the same issue and could only resolve it by downloading the iOS versions again (from Xcode Preferences > Components) that are used in my list of simulators. After that a rebuild (command-B) resolved the error.

In my case downloading iOS 10.3.1 was the solution, but your used versions may differ.

Eerko
  • 136
  • 2
  • 6