53

I recently installed the beta of Xcode Version 6 in OS X Mavericks, with which comes the iOS simulator for iOS 8. I've managed to successfully run from Xcode 6 beta on a device with iOS 8 Beta, but opening the simulator always get the same error I have tried to change the hardware version of iPhone 4s, iPhone 5, ... in the simulator and still gives the same error: "Unable to boot the iOS Simulator".

enter image description here

I'm working with Xcode 5.1 at the same time in Mavericks, any suggestion to solve this? Is a possible problem for run this simulator in Mavericks because is only for OS X 10.10? Thanks.

dayanruben
  • 1,061
  • 2
  • 12
  • 21

25 Answers25

44

After I found some solutions on the web, a combination of procedures worked for me:

  1. Close Xcode and iOS Simulator (and all related applications)

  2. Install (or reinstall) Xcode6-Beta to Applications folder (direct from the .dmg file)

  3. Open Xcode6-Beta and go to Xcode -> Preferences -> Locations -> Command Line Tools and select "Xcode 6.0" (be sure that you've selected the one in Applications folder)

  4. Launch the iOS Simulator and go to iOS Simulator -> Reset Content and Settings...

  5. Close all the applications and restart your mac (I unchecked "Reopen windows...")

  6. Open Xcode6-beta and test the iOS Simulator

Good luck

Alexandre
  • 564
  • 4
  • 6
  • 1
    In the "Step 3", are you sure you've selected "Xcode 6.0" installed in the Applications folder? (the install location appears just below... "/Applications/Xcode6-Beta.app" here) – Alexandre Jun 16 '14 at 21:18
  • 4
    This worked for me, without reinstalling or restarting. I did steps 1 and 3 only. – Bart Jul 27 '14 at 14:36
  • I wanted to keep the old version of Xcode 5.1.1 and install the new one separately. My colleague installed the XCode 6 by replacing Xcode 5 and for him there were no problems starting the project in the Xcode 6 simulator. As for me, trying to keep both of the Xcode versions, I got the same error. So I cleaned Content and Settings from the Simulator and restarted my computer and after that everything worked smoothly. – Lily Sep 17 '14 at 07:31
  • Didn't worked for even for non beta version. Please give me solution. :( – Pooja M. Bohora Sep 18 '14 at 12:54
9

I also had this problem and found the solution by doing following steps:

  1. Initially i downloaded Xcode 6 library in Documentation section under the path Xcode --> Preferences --> Downloads and restart my xcode but didn't solve my problem.

  2. Downloaded and installed the iOS 7.1 Simulator under the path Xcode --> Preferences --> Downloads. Restart xcode again and the problem solved.

  3. I am facing same issue again next morning. Unsetting the DYLD_INSERT_LIBRARIES variable solves my problem:-

    1. Open terminal and type "sudo vi /etc/launchd.conf" command and press Enter
    2. Press I "Insert" mode and change this

      "setenv DYLD_INSERT_LIBRARIES /usr/lib/libimckit.dylib" 
      

      to this

      "unsetenv DYLD_INSERT_LIBRARIES /usr/lib/libimckit.dylib" 
      

    and press esc to exit from insert mode.

    1. Save changes by typing ":wq" Press Enter
    2. Reboot your system and problem soloved.

enter image description here

Prior to that I didn't find any iOS version in front of each listed devices but after installation or by unsetting DYLD_INSERT_LIBRARIES variable I found the same in front of each device.

enter image description here

OrangeDog
  • 36,653
  • 12
  • 122
  • 207
iGW
  • 633
  • 5
  • 14
  • Thnx this worked for me..!!! I tried all the solutions provided, but none of them worked for me. Also I reinstalled Xcode, but no use. Then finally your solution worked!!! – Mahesh Oct 10 '14 at 05:06
  • 1
    Unsetting the DYLD_INSERT_LIBRARIES variable solves my problem:-. – user1467024 Oct 10 '14 at 20:03
  • When I open launchd.conf file it is empty.. I cant find any content in the file..Please help what to do..I am struggling for last one week to boot ios simulator – KishoreThindaak Feb 02 '15 at 07:59
  • I had the same issue and this solved it for me on 10.13.3 and Xcode 7.3.1 – MixCoded Mar 26 '18 at 19:29
7

I solved by removing and re-adding the simulators see screenshots here.

https://stackoverflow.com/a/25387715/1565615

Community
  • 1
  • 1
StackRunner
  • 1,463
  • 2
  • 16
  • 22
  • This worked for me. First open the simulator and select a device that works in Hardware -> Device. Then select Manage Devices and delete the ones that aren't working. Add the same devices you deleted and they should be working. – Bjørn Olav Ruud Sep 03 '14 at 07:45
  • This did it for me too, the accepted answer did not, even after rebooting many times. – QED Apr 15 '15 at 20:38
4

I don't believe your issue is related to running Xcode 6 in Mavericks, as I encountered the same error on OS X 10.10.

After a bit of toying around with XCode and the iOS Simulator, the only fix I found was simply restarting the computer, and the error hasn't appeared since.

Try a reboot and then see if you can get things up and running.

(On a side note, after restarting just XCode (not the OS), I lost the option to run on the simulator at all—the reboot also fixed this problem, if anyone here encounters anything similar).

username tbd
  • 9,152
  • 1
  • 20
  • 35
  • 2
    @username_tdb thanks for your answer. After restart the computer I get the same error again. – dayanruben Jun 03 '14 at 21:58
  • In the process of trying to figure things out I also ended up running XCode from a different location (I was running straight off the .dmg before, so if you're doing the same, try running it from your Applications folder) and installing the iOS 7 simulator. Both of those were before the restart, so you may want to give any combination of them a try too! – username tbd Jun 03 '14 at 22:15
  • Restart worked for me. I also changed the device type (`Hardware > Device`) and reset the simulator (`iOS Simulator > Reset Content and Settings...`) – Patrick Jun 04 '14 at 02:16
  • @Patrick and username_tbd, don't work for me these steps, I try and nothing. – dayanruben Jun 04 '14 at 11:12
  • 3
    Same problem even I reinstalled the xCode its still a problem – Tarun Seera Jun 05 '14 at 16:58
4

In Xcode go to the Xcode menu->Open Developer Tool - IOS Simulators. Choose simulator and then go hardware->device->manage device.

If the troubled device shows in the left column, delete it. Then add the device back from the '+' button. If it wasn't there in the first place, simply add it using the '+' button.

Micah
  • 1,676
  • 16
  • 23
  • Why the downvote? Please explain because this worked for me when the other 50 remedies didn't... – Micah Aug 11 '14 at 16:30
  • Indeed, this answer worked for me as well. I had migrated my user account to a new Mac, including Xcode 6 beta 5, and all the simulator devices were missing from iOS Simulator. I simply re-added them. –  Aug 14 '14 at 18:08
4

I had previously deleted ~/Library/Developer/CoreSimulator/ directory and the only command that worked for me is xcrun simctl erase all. Perhaps you might want to give this a try.

Ru Chern Chong
  • 3,692
  • 13
  • 33
  • 43
4

No need to download a new ios version. All you need is to go to About this Mac > Storage > Manage > Delete XCode Cache. And, it works for me

In latest OS version About this Mac > Storage > Manage > Developer > select Xcode cache > Click delete button

Ilyas Arafath
  • 511
  • 7
  • 13
1

I've faced same issue and solved by below steps:

1) Move xcode6-beta into application folder

2) Restart mac and open xcode6-beta from application folder.

Mani
  • 17,549
  • 13
  • 79
  • 100
  • did you close all other xcode and simulator before check this? – Mani Jun 05 '14 at 13:06
  • 1
    I close all instances of Xcode, iOS Simulator, AppCode, ... all related applications. Copy again the Xcode6-Beta.app into Applications folder, restart the OS and problem still there :( – dayanruben Jun 05 '14 at 19:53
1

i too had the same issue, but solved by installing the required simulators (Xcode > Preferences> downloads > install simulators)

venkatesh
  • 81
  • 1
  • 2
1

This happened to me running the simulator on both Xcode 7 and 8 on El Capitan. The only thing that worked was disabling System Integrity Protection (https://apple.stackexchange.com/a/208481/86757).

Community
  • 1
  • 1
Ric Santos
  • 15,419
  • 6
  • 50
  • 75
1

I tested an awful quantity of solutions and the only one which worked for me was disabling root protection through Recovery Mode. I tested it with XCode 7.3, it's possible that this approach may work for XCode 8.

  • Reboot and hold the keys cmd + R prior to show the loading view with Apple Logo
  • When you are on Recovery Mode, go to Menu and choose Terminal
  • Type csrutil disable
  • Reboot the machine and run the simulator again.
Jesús Castro
  • 2,061
  • 1
  • 22
  • 26
1

I am adding this answer as it seems to be slightly different from the others.

Due to working on an older project I needed to download and run Xcode 7.3 and load the project in simulator - this yielded the "Unable to boot the iOS Simulator" error.

I completed all the above suggestions and none of them worked (reset simulator setting, restarted, deleted and reinstalled Xcode, reset the simulator location, restarted again etc)

In the end the issue was that I was trying to load the iPhone 5 (10.0) simulator on Xcode 7.3.

You can see here the Apple release notes for Xcode 7.3

Xcode 7.3 requires a Mac running OS X 10.11 or later.

Xcode 7.3 includes SDKs for iOS 9.3, watchOS 2.2, OS X version 10.11.4, and tvOS 9.2.

As you can see Xcode 7.3 doesn't include an SDK for iOS 10.0

This meant as soon as I loaded the simulator with iPhone 5 (9.3) it worked immediately.

I would therefore recommend when approaching this issue not to get railroaded (as I did) in thinking that something is wrong with the system before checking the basic things.

Note: It is also worth noting that the simulator must be configured to the Xcode version being used. This can be set in

Xcode -> Preferences -> Locations -> Command Line Tools

enter image description here

and also using the command line:

sudo xcode-select --switch /Applications/Xcode_7.3.app/Contents/Developer

*change the Xcode version to the new one you want to use

sam_smith
  • 6,023
  • 3
  • 43
  • 60
1

one of the reasons could be you might deleted /private folder.

you can try with following commands

sudo mkdir /private/tmp 
sudo chmod 1777 /private/tmp
krishnazden
  • 1,127
  • 10
  • 19
0

Following are the steps for solved above issue:

  1. Search launchd.conf file in your mac

  2. If not found then create from Terminal with help of command

~ user$ sudo touch /etc/launchd.conf

  1. Terminal will ask you machine password

  2. Then Open created file with help of command for EDIT, if terminal give you error as permission failed

~ user$ sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/launchd.conf

  1. Open file manually from /etc/launchd.conf (Shift+cmd+g) and enter /etc/ (TextEdit software)

  2. In file "DYLD_INSERT_LIBRARIES" flag replace with "ZZ" and save it.

  3. Restart your machine.

  4. Xcode will defiantly works.

Amol
  • 85
  • 5
0

This error indicates an error starting up launchd_sim when booting the simulated device. In and of itself, it does not indicate the actual cause. You can look in ~/Library/Logs/CoreSimulator/CoreSimulator.log for more information about the error (including the error reason).

Possible causes:

  1. On OSX 10.9 and earlier, DYLD_INSERT_LIBRARIES could be set by 3rd party applications. On later versions, invalid DYLD_INSERT_LIBRARIES are ignored instead of resulting in an error.

  2. Usage of older simulator runtime DLC with Xcode 7 betas. Newer versions of Xcode ignore these older DLC.

If you need additional help, please provide that additional datum.

Jeremy Huddleston Sequoia
  • 22,938
  • 5
  • 78
  • 86
0

Just check your simulator's iOS version. I fought with this error for 2 days and tried everything. Once I run the project on the simulator with iOS version that my Xcode supports, it worked sadly... :/

Murat Yasar
  • 994
  • 9
  • 24
0

I quit everything and restarted the Mac. That's all. Its worked like charm!!

Sanoj Kashyap
  • 5,020
  • 4
  • 49
  • 75
0

I don't know why, but this happened to me when I had Charles Proxy's throttling turned on.

I didn't have to run Xcode again or clean anything. Just disabling the throttling allowed the simulator to work again.

I also clicked on details, but this was all that I got:

Details

Unable to boot the Simulator. Domain: NSPOSIXErrorDomain

Code 60

Failure Reason: launchd failed to respond.

This might be related a known Xcode 11.2 issue:

Third party “endpoint security” software may cause slow simulators, system freezes, or prevent debug processes from running in simulators reliably. This sometimes manifests as debugserver disconnections or simulator applications receiving a SIGKILL signal. (55853555)

Workaround: Uninstall the third party software.

Though I was seeing this error on 11.1. Yet Apple may have just not realized this was an issue on 11.1 as well ¯_(ツ)_/¯

Community
  • 1
  • 1
mfaani
  • 33,269
  • 19
  • 164
  • 293
0

I have solved this issue using following steps:

Xcode -> Preferences -> Location -> Derived Data -> Delete your project folder.

Dheeraj D
  • 4,386
  • 4
  • 20
  • 34
0

I got this error on OS Catalina, Xcode 11. I solved this by simply quiting simulator and Xcode, and then start Xcode and run your application.

Abdul Karim Khan
  • 4,256
  • 1
  • 26
  • 30
0

1. Quit Xcode and Simulator if running.

2. Remove customised settings setup

defaults delete com.apple.Xcode

3. remove configuration folders

rm -rf ~/Library/Application\ Support/Xcode

4. Quit the terminal and run Xcode again.

Sameer Sitre
  • 17
  • 1
  • 4
0

Resetting the simulators fixed the issue for me. Run the below Fastlane command to reset all simulators,

fastlane snapshot reset_simulators

Please ensure you have closed Xcode & simulator before running the command.


Fastlane is an Android & iOS deployment automation tool.

Ajay Sivan
  • 2,807
  • 2
  • 32
  • 57
0

I just simply follow the below steps and the issue is resolved...

Go to About This Mac > Storage > Manage > Developer > Select Xcode cache > Delete the cache

Now try to open the simulator again and it will work... In case if above steps did not work just try to do the same with s

Dhaval Kansara
  • 3,478
  • 5
  • 22
  • 50
-1

Late answer, but it maybe helpful to someone. I tried all the solutions provided in this and related posts and neither of them worked.

I am using OSX(version 10.10.3) and Xcode 6.2. To fix this issue I followed the following steps :

  • Delete all xcode and simulator related files using AppCleaner.
  • Restart Mac.
  • Open Disk Utility app from applications.
  • In Disk Utility app; click on button Verify Disk Permission for your Macintosh HD (there will be some warnings displayed; I think /private/tmp is cause of this issue).
  • In Disk Utility app; click on button Repair Disk Permission for your Macintosh HD.
  • Re-install Xcode; now it should work.

More info : How to fix Xcode error ‘Unable to boot iOS Simulator’.

turtle
  • 1,619
  • 1
  • 14
  • 30
-1

This may helpful

  • Open simulator with 4s
  • Click on menu- iOS simulator
  • Click on Reset content and settings...
  • Force close the simulator and run app.
Hardik Mamtora
  • 1,642
  • 17
  • 23