102

I am getting following compile time issue when running the app with Xcode 10.3 beta 2 on iPad Air, I am getting the below issue.

Failed to find a suitable device for the type SimDeviceType : com.apple.dt.Xcode.IBSimDeviceType.iPad-2x with runtime SimRuntime : 10.3 (14E5239d) - com.apple.CoreSimulator.SimRuntime.iOS-10-3

Any help is greatly appreciated.

Rein rPavi
  • 3,368
  • 4
  • 22
  • 32
  • 1
    Just a heads up - ulsc's answer below is what is happening here. `sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService` does the trick – Will Von Ullrich Aug 01 '19 at 13:43

9 Answers9

339

It seems like the old simulator process remained open in the background during an XCode update.

Simply running

sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService

in terminal may solve the problem.
There shouldn't be a need for cleaning the project and/or build folder.

ulsc
  • 2,839
  • 1
  • 11
  • 8
20

If you quit Xcode and still get the same error, then try clean (command + shift + option + k) and select option "Clean" in popup. Repeat this 2 to 3 times. It works in my case.

glennsl
  • 28,186
  • 12
  • 57
  • 75
Mayur Tanna
  • 361
  • 4
  • 9
  • 7
    This seems to be the golden rule when it comes to Xcode - repeat the same solution many times and eventually it works. – miphe Mar 27 '19 at 14:51
7

I was experiencing the same problem. In my case, I had launched the Simulator from a previous version of Xcode prior to building. The problem persisted when I quit the simulator, but restarting Xcode solved it for me.

Eric G
  • 91
  • 3
6

I just ran into the same issue on the latest Xcode 10.3 (10G8). Had to perform about 4 or 5 full project cleans, and bounce the box, before I could compile again. I wish Apple would get this fixed.

BonanzaDriver
  • 6,411
  • 5
  • 32
  • 35
2

I simply had to disconnect the iPad I had connected to my Mac. For some reason that was messing with the way Xcode was compiling.

Tiago
  • 1,984
  • 1
  • 21
  • 43
1

The only thing that solved it for me was the following:

  1. Clear the ~/Library/Developer/CoreSimulator/Profiles/Runtimes folder
  2. Restart Xcode
  3. Clear the project
  4. Run the project
Rashwan L
  • 38,237
  • 7
  • 103
  • 107
0

I solve this by launching the simulator first, Xcode will pass the build.

then run the project on the device.

hope this will help

Randall Wang
  • 1,007
  • 3
  • 10
  • 24
0

If you are running multiple versions of xcode, you should check xcode-select -p to ensure you are using the correct version of xcode and compiler. If not, use xcode-select -s { correct xcode path } to set the correct version of xcode.

Marquis103
  • 395
  • 3
  • 8
  • I am using Xcode 8.3 and Xcode 9. When I input in terminal `xcode-select -p` I get `/Applications/Xcode.app/Contents/Developer` . How can I fix this? In Applications folder I have the name Xcode for Xcode9 and | Xcode8 for Xcode 8 – bibscy Jul 09 '18 at 09:33
  • Inside of the applications folder you probably manually put it there. If you installed through the App Store, that version will be /Applications/Xcode.app/Contents/Developer. I do not believe there can be two installed app store versions at the same time. If you want to switch, then you need to manually point to the other one, which as I said believe was manually put there. So the same thing still applies where you `xcode-select -s { Xcode8 or 9 }` – Marquis103 Jul 31 '18 at 16:52
0

Getting same issue but after an hour getting success to fix this issue there is xcode problem. So please reopen your xcode and then clean your project.. or use short cut command for clear (command + shift + option + k)

Rawan-25
  • 1,753
  • 1
  • 17
  • 25