Unable to boot the iOS simulator

After upgrading to El Capitan, I now get this error when running my simulator for 7.1 using Xcode 6.3.2 (8.3 simulators are fine)


1) I checked for /etc/launchd.conf and there is none

2) I tried deleting the 7.1 runtime and reinstalling it from xcode / preferences / components

3) I tried deleting and readding the simulator for the devices (4s, 5, etc)

3) I tried Xcode 7 Beta


Here are some logs from https://forums.developer.apple.com/message/5474#5474

-

Jun 16 11:55:30 com.apple.iphonesimulator[18024] <Error>: Error Domain=NSPOSIXErrorDomain Code=60 "Unable to boot the iOS Simulator." UserInfo=0x7ffa9285bb30 {NSLocalizedDescription=Unable to boot the iOS Simulator., NSLocalizedFailureReason=launchd failed to respond.}

-

Process: launchd_sim [2066]

Path: /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/libexec/launchd_sim

Identifier: launchd_sim

Version: ???

Code Type: X86-64 (Native)

Parent Process: ??? [1]

Responsible: launchd_sim [2066]

User ID: 501



Date/Time: 2015-06-15 13:05:56.060 -0700

OS Version: Mac OS X 10.11 (15A178w)

Report Version: 11

Anonymous UUID: EE5B5C30-CC0B-9BF2-5594-58B5C1A21D1E





Time Awake Since Boot: 1700 seconds



Crashed Thread: 0



Exception Type: EXC_BREAKPOINT (SIGTRAP)

Exception Codes: 0x0000000000000002, 0x0000000000000000

Exception Note: EXC_CORPSE_NOTIFY



Application Specific Information:

dyld: launch, loading dependent libraries

DYLD_FALLBACK_LIBRARY_PATH=/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib

DYLD_ROOT_PATH=/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot

DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/CoreSimulator/RuntimeOverlay/usr/lib/liblaunchd_sim_interposition.dylib

DYLD_FALLBACK_FRAMEWORK_PATH=/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks

DYLD_SHARED_REGION=avoid



Dyld Error Message:

Symbol not found: _XPC_COALITION_INFO_KEY_BUNDLE_IDENTIFIER

Referenced from: /usr/lib/system/libsystem_stats.dylib (which was built for iOS 10.11)

Expected in: /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libxpc.dylib

in /usr/lib/system/libsystem_stats.dylib

-

Any help would be appreciated

Replies

I am having the same issue.


My situation is slightly different -- I'm on Yosemite and have issues with ALL the simulators on both Xcode 6 & 7. I can't run the simulator with either version of Xcode.


I've deleted, installed, re-deleted and re-installed multiple times, with reboots in between. I've tried most of the reasonable sounding solutions that others have posted on the internet.


I had this happen to me on my personal laptop last year with Xcode 5/6. Did basically the same thing with my work laptop and it worked just fine. This time, it seems to be my work laptop that has taken the hit (both have been reformatted with fresh installs of the OS several months ago). Unfortunately, last time, I ended up having to reformat and do a fresh install of the OS due to one of the solutions that, in retrospect, probably wasn't the best thing to try. So, I'd really like to find a solution that didn't require me to do a reformat and re-install.


Any help or ideas would be greatly appreciated.


Thanks!

If this helps you to get your simulators back, good, because it fixed my situation. Executive summary is that my ~/LibraryApplications Support folder needed to be cleaned up by removing the "iPhone Simulator" folder. Then all simulators worked, again. My method below to figure this out is to make sure it was not because of one version of OS X or one version of Xcode, since always there are many. TL;DR to follow.

First off, release notes say Xcode 7 only runs iOS 9 simulators, so that should be the expectation on either 10.10 or 10.11. Also, the Preferences > Downloads panel shows that other simulators may be installed, but I have seen a radar referenced on that issue; try as you might they cannot be installed. So right away, I used Xcode 7 for testing XCTest UI test features, primarily, under what I had which was a 10.10.4 machine. but, I could run on any device in 10.10.3 or 10.10.4.

I needed to resolve what I had done with all these installs, so I went back to running Xcode 6.4 on my 10.10.4 machine and this also could not run simulators. But, I did have another machine that was 10.10.3 that could run simulators; a-ha.I had trouble shortly after installing Xcode 7 on 10.10.4 that I could not run any simulators. I had experienced this on Xcode 6.4, as well, off and on, historically. I had been using this particular disk since Mavericks, so I decided that it was time to lose a lot of baggage (~/Library/Application Support and ~/Library/Preferences haul around all kinds of assumptions, per application version, independent of the app being Xcode). So I decided to reformat my drive and jump into 10.11 Beta 4 and see if it was related to the OS X that Xcode 7 was running on. It's good to have both OS X's around during Beta developments for diagnosing just such problems. But, after migrating my user files into 10.11 Beta 4, then 5 through an update, I still had no simulators running in either 10.10 or 10.11 in either Xcode 6.4 or Xcode 7, so this could not be related to the OS X release, but must be related to the baggage.


So I compared my application support folder and preferences to root cause the issue and it seemed that in the 10.10.3 version, there was a folder called "iPhone Simulator" that when removed, seemed to allow my simulators to work again in Xcode 6.4. In the process of house cleaning, I also removed a lot of preferences files. I never make the time to start with a fresh account adn customize the applications I use, including new Xcode releases and when you feel like you are bitten, it's likely you are biting yourself. Refresh those directories and moving on is a big help.

The iOS 7.1 simulator runtime is not supported on El Capitan.

Useless.


Our yosemite 10.10.5 + xcode 6.3/6.4 are the same issues with danielcp and BeardedMan

It seems that yosemite 10.10.4+ do not support ios 7 simulator

There are many issue like this:

http://www.stackoverflow.dluat.com/questions/30941756/xcode-6-and-ios-7-1-simulator-unable-to-boot-the-ios-simulator


Hope there are some fixes or we cannot test features for ios7.

That's not correct Raydem. You may certainly be having issues on Yosemite, but not this one. This issue is *specifically* about incompatibilities between the iOS 7.1 Simulator Runtime and OS X 10.11 El Capitan. You can see this in the dyld error message that was provided:


Dyld Error Message:

Symbol not found: _XPC_COALITION_INFO_KEY_BUNDLE_IDENTIFIER

Referenced from: /usr/lib/system/libsystem_stats.dylib (which was built for iOS 10.11)

Expected in: /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libxpc.dylib

in /usr/lib/system/libsystem_stats.dylib


This is a specific incompatibility of the iOS 7.1 libxpc being too old to satisfy the needs of the host's libsystem_stats.dylib. Versions of OS X older than 10.9 had interdependencies between the libSystem umbrella children which did not allow us to easily host the simulator without bringing in the entirety of the host's libSystem (even though we only needed a small piece of it). This lead to some complications because we needed to have the iOS libdispatch and libxpc as the only versions in the process, but in cases like this, they could be too old for the upper level host dependents. In OS X 10.9, we improved layering of the host libSystem. We were able to utilize this functionality in iOS 8.0, which is why if you look at an iOS 8.0 simulator process, you'll only see three host images in the process instead of the entire libSystem umbrella like older iOS versions.


Raydem, if you are experiencing issues, please create a new topic and provide information specific to your case.

~/LibraryApplications Support/iPhone Simulator is not used by Xcode 6 and newer. CoreSimulator (which is used by Xcode 6 and newer) stores data in ~/Library/Developer/CoreSimulator.


I suspect that maybe something else was related to your fix. If you can reproduce and provide more specifics about what the problem is, I'd be interested.

Thanks for your help. I will show the details.

Almost same issues here. After upgrading to 10.10.5 and XCode 7, all simulators ( iOS 9 and iOS 8.x installed via "Downloads" ) didn't work.

Deleting the "Iphone Simulator" folder, as suggested by ksapps17, made everything work.

I too have the same problem, tried all the possible solutions from internet still not able to boot. Bug report is saying


Process: launchd_sim [755]

Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/sbin/launchd_sim

Identifier: launchd_sim

Version: 2.1.0 (560.20.11)

Code Type: X86-64 (Native)

Parent Process: ??? [1]

Responsible: launchd_sim [755]

User ID: 501


Date/Time: 2016-10-19 15:42:14.688 +0530

OS Version: Mac OS X 10.11.1 (15B42)

Report Version: 11

Anonymous UUID: EFB97D4A-79BD-6CC6-2309-19D3C4A1FC2C


Time Awake Since Boot: 1200 seconds

System Integrity Protection: enabled


Crashed Thread: 0 Dispatch queue: com.apple.main-thread


Exception Type: EXC_BAD_INSTRUCTION (SIGILL)

Exception Codes: 0x0000000000000001, 0x0000000000000000

Exception Note: EXC_CORPSE_NOTIFY


Thread 0 Crashed:: Dispatch queue: com.apple.main-thread

0 launchd_sim 0x0000000103f9dfee 0x103f76000 + 163822

1 launchd_sim 0x0000000103f7adc4 0x103f76000 + 19908

2 libdyld.dylib 0x0000000104384145 start + 1


Thread 0 crashed with X86 Thread State (64-bit):

rax: 0x0000000103fa7ea3 rbx: 0x0000000103fa7e93 rcx: 0x0000000103fb2a88 rdx: 0xffffffffffffffff

rdi: 0x0000000000000001 rsi: 0x00000000000001c0 rbp: 0x00007fff5bc898a0 rsp: 0x00007fff5bc897d0

r8: 0x2f706d742f657461 r9: 0x0000000104458600 r10: 0x00000000000050c8 r11: 0x000000010469f3d7

r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x00007fff5bc899f8 r15: 0x0000000000000000

rip: 0x0000000103f9dfee rfl: 0x0000000000010287 cr2: 0x00007fff5bc88ff8


Logical CPU: 1

Error Code: 0x00000000

Trap Number: 6

Binary Images:

0x103f76000 - 0x103faefff +launchd_sim (2.1.0 - 560.20.11) <ED38649C-0141-3197-9AE6-67BBCD671479> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/sbin/launchd_sim

0x103fbd000 - 0x103fe177f +dyld_sim (360.17) <CA4A779A-BA45-39C7-9456-1B8A06818142> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/dyld_sim

External Modification Summary:

Calls made by other processes targeting this process:

task_for_pid: 0

thread_create: 0

thread_set_state: 0

Calls made by this process:

task_for_pid: 0

thread_create: 0

thread_set_state: 0

Calls made by all processes on this machine:

task_for_pid: 697

thread_create: 0

thread_set_state: 0


VM Region Summary:

ReadOnly portion of Libraries: Total=8280K resident=0K(0%) swapped_out_or_unallocated=8280K(100%)

Writable regions: Total=19.7M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=19.7M(100%)


VIRTUAL REGION

REGION TYPE SIZE COUNT (non-coalesced)

=========== ======= =======

Kernel Alloc Once 4K 2

MALLOC 9396K 8

MALLOC guard page 16K 4

Process Corpse Info 2048K 2

STACK GUARD 56.0M 2

Stack 8192K 2

VM_ALLOCATE 4K 2

__DATA 904K 48

__LINKEDIT 1912K 40

__TEXT 6368K 40

shared memory 8K 3

=========== ======= =======

TOTAL 84.2M 142


Is anybody got the same error log?Kindly help on this.

This is a completely different issue than what has been reported earlier in this thread.


The error in your case is "Could not create temporary state directory."


This error indicates that launchd_sim is unable to create its temporary state directory (/tmp/com.apple.CoreSimulator.SimDevice...<UDID>.launchd_sim).


Due to the volume of reports that have been surfacing over the past few weeks, I suspect the corruption isn't user-error but more likely an installer messing up the system.


Users experiencing this issue should collect the following data and file a radar at http://bugreport.apple.com (please leave the radar number in the comment, so I can followup internally on the ticket):



sudo ls -lO / /tmp /var /private /private/tmp /private/var

sudo stat /tmp /private/tmp

sudo sysdiagnose -q

pkgutil --file-info /tmp

pkgutil --file-info /private/tmp



After collecting the above data and filing a radar, you can possibly just **** and recreate it with:


sudo rm -rf /private/tmp

sudo chmod 1777 /private/tmp

sudo rm /tmp

sudo ln -s private/tmp /tmp


If you have no idea what those commands do or how to recover if something goes wrong when executing them, DONT'T DO IT.

I know your response was a couple years ago, but...THANK YOU for this. Deleting the contents of that CoreSimulator folder got the simulator working again for me.