iOS Build Failed at compile time with issue "failed to find a suitable device for the type SimDeviceType"

IosXcodeCompilation

Ios Problem Overview


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.

Ios Solutions


Solution 1 - Ios

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.

Solution 2 - Ios

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.

Solution 3 - Ios

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.

Solution 4 - Ios

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.

Solution 5 - Ios

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.

Solution 6 - Ios

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

Solution 7 - Ios

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

then run the project on the device.

hope this will help

Solution 8 - Ios

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.

Solution 9 - Ios

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)

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionRein rPaviView Question on Stackoverflow
Solution 1 - IosulscView Answer on Stackoverflow
Solution 2 - IosMayur TannaView Answer on Stackoverflow
Solution 3 - IosEric GView Answer on Stackoverflow
Solution 4 - IosBonanzaDriverView Answer on Stackoverflow
Solution 5 - IosTiagoView Answer on Stackoverflow
Solution 6 - IosRashwan LView Answer on Stackoverflow
Solution 7 - IosRandall WangView Answer on Stackoverflow
Solution 8 - IosMarquis103View Answer on Stackoverflow
Solution 9 - IosRawan-25View Answer on Stackoverflow