1

I'm getting the following error:

Error Code: (Domain = DTiPhoneSimulatorErrorDomain, Code = 2)

Any ideas?

rebello95
  • 8,486
  • 5
  • 44
  • 65

2 Answers2

2

Try opening the Simulator and from the menu select Reset Content and Settings then rebuilding your app

Marck Gorgon
  • 73
  • 1
  • 7
  • I've tried that, and I restarted my Mac... It did not work. – Young_Programmer Sep 25 '14 at 20:06
  • Check this: [Xcode beta 6 iOS 8: Simulator not working](http://stackoverflow.com/questions/24727397/xcode-beta-6-ios-8-simulator-not-working) Hope it helps you! – Marck Gorgon Sep 25 '14 at 21:10
  • I couldn't find anything that would work... I've tried nearly everything. Deleting the simulators, restarting the mac, and adding them back in. And then doing what you said. And I deleted Xcode and reinstalled it. @MarckGorgon – Young_Programmer Sep 25 '14 at 21:45
0

Is there anything interesting in ~/Library/Logs/CoreSimulator/CoreSimulator.log?

Do you see an "Unable to boot the iOS Simulator." error message in that log file or in a dialog in iOS Simulator.app? If so, that is almost always because launchd_crashed because DYLD_INSERT_LIBRARIES was set to something not compatible with the iOS Simulator runtime. Do you have any crash logs (eg: launchd_sim crashes) in ~/Library/Logs/DiagnosticReports? If so, check if they show DYLD_INSERT_LIBRARIES being set. If that's the case, your options are to either update to an OS X Yosemite host (which will deal with this issue) or unset DYLD_INSERT_LIBRARIES (likely set in /etc/launchd.conf or ~/.launchd.conf)

Another common cause of this error message is a bug mentioned in the release notes in which the current workaround is to just try again (there is a timing bug during install/launch).

Jeremy Huddleston Sequoia
  • 22,938
  • 5
  • 78
  • 86
  • I did see "Unable to boot the IOS Simulator" in that log file. And when I launch IOS Simulator it does say "Unable to boot the IOS Simulator". And in "~/Library/Logs/DiagnosticReports" In the '.crash' files I found this "DYLD_INSERT_LIBRARIES=/usr/lib/libimckit.dylib". Is that correct? – Young_Programmer Sep 26 '14 at 14:22
  • Yep. That's the issue. See my answer to http://stackoverflow.com/questions/25962143/xcode6-0-1-not-able-to-start-ios8-simulator/26053165#26053165 – Jeremy Huddleston Sequoia Sep 26 '14 at 22:09