Common iOS Simulator Error Messages

This thread has been locked by a moderator.

There are a couple error messages that developers have seen when using the iOS Simulator. We can certainly do better to make these error messages less cryptic in future releases, but for now, hopefully this post will help you out. Note that this information (likely a more condensed form of it since I am quite verbose here) should appear in Xcode release notes.


1) "Unable to boot the iOS Simulator"


This error message will appear in iOS Simulator, and if hitting Build&Run from Xcode, you will likely get an (Domain = DTiPhoneSimulatorErrorDomain, Code = 2) error there as well. With iOS 7 and later, the simulator runtime gained its own bootstrap server (launchd_sim) rather than relying on the host's launchd. In Xcode 6.0 and 6.1, this error message is only displayed in the event that launchd_sim crashes upon launch before the simulator can checkin with it. The only known cause of this issue is from the installation of 3rd party software which alters the behavior of OS X in unsupported ways by setting DYLD_INSERT_LIBRARIES to inject code into every running process. Please check /etc/launchd.conf to determine if this is the case. If it is, please unset DYLD_INSERT_LIBRARIES (likely be just deleting /etc/launchd.con) and reboot your system to restore functionality, or upgrade to OS X Yosemite which has changes to work around this problem. If the issue persists, please file a radar with ~/Library/Logs/CoreSimulator/.log and any launchd_sim crash logs in ~/Library/Logs/DiagnosticReports


2) "(Domain = LaunchServicesError, Code = 0)"

This error message will be displayed by Xcode when installation of your built app fails. Unfortunately, Xcode does not reveal the actual underlying error in the dialog. Check ~/Library/Logs/CoreSimulator/CoreSimulator.log for information on the underlying error. If more information is needed, check ~/Library/Logs/CoreSimulator/<Device UDID>/system.log as well. In almost all cases, the issue is that there is a problem with Info.plist (missing keys, containing illegal values, etc).

3) "(Domain = FBSOpenApplicationErrorDomain, Code = 4)", "(Domain NSPOSIXErrorDomain, Code = 3"), "Domain=IDEUnitTestsOperationsObserverErrorDomain Code=3", "Lost Connection to ...", "Debugger disconnected", or app getting SIGKILLed soon after launch

Upon installation of an app, SpringBoard will SIGKILL that app's process in order to force a relaunch of the app with the new executable. The problem is that there is a race condition whereby SpringBoard may accidentally SIGKILL a *new* process that we just launched rather than the old process. Which of the various error messages you get depends on exactly when in the launch process the SIGKILL was delivered. Normally, this shouldn't happen, so the advise is to just try again (sorry =/). If you find that this happes to you all the time or more frequently than you can tollerate, we are incredibly sorry. We are aware that systems with slower disk I/O will see this happen more frequently than faster systems, so if you are using an NFS home directory, you may want to create a local directory for your simulator data and setup a simlink to it from ~/Library/Developer/CoreSimulator

---

If you file a radar for issues in the simulator, please include ~/Library/Logs/CoreSimulator/.log. It would be even more helpful to us if these logs contained extra debug logging rather than just notices, warnings, and errors. To enable more verbosity in the logs, you can set the following preferences:

defaults write com.apple.iphonesimulator DebugLogging -bool YES

defaults write com.apple.CoreSimulator DebugLogging -bool YES

Up vote post of DTS Engineer
3.8k views