5

The error I get when building a previously working project:

Images.xcassets: Failed to find a suitable device for the type SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPad-2 with runtime SimRuntime : 9.0 (13A4305g) - com.apple.CoreSimulator.SimRuntime.iOS-9-0

I've removed all references of Xcode and all simulators on my mac, restarted it so many times I can't count. This happened after the last release of El Capitan 2 days ago. The project was building and running fine before.. Why would the error originate from the Images.xcassets in the first place?

I can see xcode 7 beta 4 has all the simulators included in its package, but the list of available simulators is empty. To be noted I just want to run my project on a physical device and not the simulator (which freezes when open)

Log from the CoreSimulator that's been showing since the moment I upgraded OSX:

Jul 22 14:53:53 CoreSimulatorService[787] : com.apple.CoreSimulator.CoreSimulatorService 166~1 starting.

Managed to narrow it down to removing all the images from the Images.xcassets and adding an AppIcon and a LaunchImage to that. Builds ok, but whenever I attempt to add any other Image the build will fail again with the same error as mentioned above. It only builds if the images are left empty with no associated png files. Why though?

Mezzo
  • 85
  • 1
  • 5
  • Open a ticket at http://bugreport.apple.com – lewis Jul 25 '15 at 13:43
  • 2
    I did that already. Still waiting for a reply. – Mezzo Jul 26 '15 at 07:44
  • I have a similar ish issue which I opened a ticket for too :( – lewis Jul 26 '15 at 17:52
  • Managed to address the issue by reinstalling OSX. I assume there was a problem during the os update. – Mezzo Jul 27 '15 at 13:29
  • Thanks for the update and well done on getting it fixed. Did you do a format and reinstall or just install over the top? It's weird because at least for me I installed Xcode after El Cap. And the old Xcode still works. Would be super happy to get it fixed though. It's a fun time of year :) – lewis Jul 27 '15 at 16:53
  • That's what happened to me as well but took a chance and used this: https://support.apple.com/en-us/HT201314 to reinstall the same os version just in case. – Mezzo Jul 27 '15 at 17:13
  • Cool, thanks. You should post an answer and accept it :) – lewis Jul 27 '15 at 20:55
  • Status update: The ticket I raised for this was closed as a duplicate – lewis Jul 30 '15 at 20:07

3 Answers3

1

Try Delete all the files in these two path

rm -rf ~/Library/Developer/CoreSimulator
rm -rf ~/Library/Developer/Xcode
Albert.Qing
  • 4,220
  • 4
  • 37
  • 49
0

The official discussion of a related issue is in Apple's forums, but people confuse both issues since they have similar characteristics.

The current El Capitan Beta has a bug which causes issues loading dyld_sim from older versions of the iOS Simulator in El Capitan.

Previous versions of El Capitan Beta had a different bug which caused CoreSimulatorService to crash (and thus limit simulator availability) if you had older legacy runtimes installed to /Library/Developer/CoreSimulator.

The workaround discussed in the forum post will work around both issues:

sudo xcode-select -s /path/to/Xcode-beta.app  
[[ -d /Library/Developer/CoreSimulator ]] && sudo mv /Library/Developer/CoreSimulator{,.bak}  
sudo mv $(xcrun --sdk iphonesimulator --show-sdk-path)/usr/lib/dyld_sim{,.bak}  
sudo mv $(xcrun --sdk watchsimulator --show-sdk-path)/usr/lib/dyld_sim{,.bak}  

Updating Xcode in the future will "undo" the change to Xcode.app. The newest Xcode.app beta, which was released after the El Capitan Beta, is not affected by this bug.

In the future, after a new El Capitan beta is released and you have updated, you will want to restore /Library/Developer/CoreSimulator if you moved it aside:

[[ -d /Library/Developer/CoreSimulator.bak ]] && sudo mv /Library/Developer/CoreSimulator{.bak,}  
Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Jeremy Huddleston Sequoia
  • 22,938
  • 5
  • 78
  • 86
-3

Following the instructions here: support.apple.com/en-us/HT201314, reinstall OSX using Recovery. Before you do that, remove all Xcode references. After the os installation, reinstall Xcode and the project should be building just fine.

Mezzo
  • 85
  • 1
  • 5
  • 2
    That is *super* overkill and won't actually address the problem. This is a known issue and documented in release notes. – Jeremy Huddleston Sequoia Aug 09 '15 at 18:57
  • At the moment of the bug, I did not have the above help and had looked into the issue for 2 days straight. It was not overkill, it was the only solution left after extensive research. – Mezzo Aug 10 '15 at 08:53
  • It is overkill. You didn't need to reinstall the OS, and doing so doesn't really address the problem. The root problem is an OS bug in the El Cap betas. – Jeremy Huddleston Sequoia Aug 10 '15 at 10:43
  • I know it was a bug with the OS which is why I submitted a bug report to Apple. Given I did not find an answer in 2 days straight, I could not build the project therefore progress my work at all so no, I do not consider reinstalling an overkill as it allowed me to move on. – Mezzo Aug 10 '15 at 12:09