1

I have installed latest Xcode 6 and try to run my project on iOS 8 simulator.It gives error as "unable to boot iOS simulator". I have tried all stack overflow answers but not able to fix this.

Pradip
  • 677
  • 9
  • 26

2 Answers2

4

I was facing the same issue and finally it is resolved. Thanks to apple who helped me.

For those who are still looking for solution, here is the one which helped me:

Just unset DYLD_INSERT_LIBRARIES environment variable in the /etc/launchd.conf or ~/.launchd.conf file. Which you can edit by "sudo vi /etc/launchd.conf" command. remove the above flag save it by using "ZZ" (captial Z) command and reboot the system. It works like a charm. Hope this helps you all.

Pooja M. Bohora
  • 1,311
  • 1
  • 14
  • 42
  • Don't replace it with "ZZ" ... there's not really a reason to do that. Just delete /etc/launchd.conf and reboot. – Jeremy Huddleston Sequoia Oct 08 '14 at 14:34
  • @JeremyHuddlestonSequoia : I suggested to save it after removing the flag DYLD_INSERT_LIBRARIES because there might be possibility of having other environment variables set in the launchd.conf file. – Pooja M. Bohora Oct 09 '14 at 11:55
  • Yes, if that is the case, saving after deleting the line is appropriate, but there's no reason to replace it with "ZZ". Also note that launchd.conf isn't supported any more as of OS X Yosemite, so it's probably easier for most users in this situation to just delete the file. – Jeremy Huddleston Sequoia Oct 09 '14 at 12:01
  • 1
    @JeremyHuddlestonSequoia: I have not asked to replace it with ZZ. I have given shortcut that how to save the file if it is editing using VI command from terminal. Edited the answer for more details. – Pooja M. Bohora Oct 09 '14 at 12:12
  • Correct, sorry. It was the other answer that says 'In "DYLD_INSERT_LIBRARIES" flag replace with "ZZ" and save it.' I should have added my comment to that one. – Jeremy Huddleston Sequoia Oct 09 '14 at 22:14
  • @JeremyHuddlestonSequoia yes. Np :) – Pooja M. Bohora Oct 14 '14 at 09:56
  • @PoojaM.Bohora: launchd.conf no such file exists. How is it? – Jayprakash Dubey Oct 31 '14 at 12:31
  • @JayprakashDubey: Can you check the steps given by amol in below answer? – Pooja M. Bohora Nov 03 '14 at 05:43
  • 1
    It does not work for me. I am using XCode 7.3.1 on MAC OSX EL Capitan. launchd.conf is empty, still i am facing "unable to boot simulator" error. Is there any other way to fix this isssue. – Surjeet Singh Oct 17 '16 at 16:53
  • I too face same issue and can't able to proceed. Even though reinstalled Xcode in different locations. Surjeet can you please tell me what you did to resolve this ? – SURESH SANKE Oct 18 '16 at 13:55
2

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

  3. Terminal will ask you machine password

  4. 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

  5. Then open file manually from /etc/launchd.conf (Shift+cmd+g) and enter /etc/ (TextEdit software)

  6. Remove the "DYLD_INSERT_LIBRARIES" line and save the file.
  7. Restart your machine.
  8. Xcode should work.
Ricardo Sanchez-Saez
  • 9,466
  • 8
  • 53
  • 92
Amol
  • 85
  • 5
  • 2
    How can you find "DYLD_INSERT_LIBRARIES" in a file you just created? – Rudolf J Nov 18 '15 at 10:44
  • 1
    It does not work for me. I am using XCode 7.3.1 on MAC OSX EL Capitan. launchd.conf is empty, still i am facing "unable to boot simulator" error. Is there any other way to fix this isssue. – Surjeet Singh Oct 17 '16 at 16:53
  • 1
    For me also. I am using EI Capitan 10.11.6 and with Xcode 7.3.1. I have tried all the stack overflow answers but none of them works out for me. I have tried reinstall Xcode in different location with with Xcode version but still no luck. launched.conf file is empty. – SURESH SANKE Oct 19 '16 at 05:46