unable to IOS simulator 分类: IOS开发 2015-05-15 20:30 28人阅读 评论(0) 收藏

After migrating from XCode 5.0 to XCode 6.0 the project fails to run with the following error.

An error was encountered while running (Domain = FBSOpenApplicationErrorDomain,

Code = 4)

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. 

After that -> 

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:-

 a) Open terminal and type "sudo vi /etc/launchd.conf" command and press Enter
 b) 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. 

    c) Save changes by typing ":wq" Press Enter
    d) Reboot your system and problem soloved. 



These steps may help you with your problem. Try this:

1( Click iOS Simulator at the top of your screen

2( Click Reset Contents and Settings

3( Click Reset when the Alert comes up

4( Run the App again on the Simulator

This will simply reset all the contents and settings on the iOS Simulator previously.

Hope this helps with the error.


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



posted @ 2015-05-15 20:30  leansmall  阅读(158)  评论(0编辑  收藏  举报