32

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)

Any suggestions?

Screenshot

Jeremy Huddleston Sequoia
  • 22,938
  • 5
  • 78
  • 86
danfelabs
  • 1,873
  • 1
  • 18
  • 23
  • 3
    and you cleaned your project and deleted the file from your simulator before building and running it under Xcode 6, right? – Michael Dautermann Sep 12 '14 at 23:53
  • 2
    I get such error with xcode 6 sometimes. Everytime fix it by closing simulator and xcode and reopen, and also reset content and settings of the simulator. But in your case I also advice you to clean derivved data of your project in xcode->orgaziner. – Nik Yekimov Sep 13 '14 at 03:43
  • @MichaelDautermann had the same problem, none of delete the file, clean the project, or delete the derived folder had any affect - it was only when I did what the selected answer suggested that I was able to run my app. – David H Sep 29 '14 at 15:14
  • possible duplicate of [Simulator error FBSSystemServiceDomain code 4](http://stackoverflow.com/questions/24763743/simulator-error-fbssystemservicedomain-code-4) – Jeremy Huddleston Sequoia Feb 26 '15 at 08:07

4 Answers4

52

iOS Simulator -> Reset Contents and Settings

Worked for me!

iOS Simulator -> Reset Contents and Settings... -> Reset

enter image description here

referenced from: http://qiita.com/tajihiro/items/f6f50b56162c93d25c90

Jeff Walters
  • 4,403
  • 2
  • 16
  • 12
1

I had this error too. My solution was product->clean

xiaotest
  • 19
  • 1
0

As described in my answer to the queation that this is a duplicate of, this error is one manifestation of an install/launch race condition bug. The suggestions you find on this forum suggesting that you should "Erase Contents & Settings" or "Clean" from within Xcode are not correct.

You simply have to try again and hope you don't loose the race on the next launch. Alternatively, you can just "finger launch" it from within the booted simulator.

Community
  • 1
  • 1
Jeremy Huddleston Sequoia
  • 22,938
  • 5
  • 78
  • 86
-2

I had this error.

I got it while using Xcode 6 on Yosemite.

My solution was to download and install Xcode 6.1 for Yosemite. This solved my issue.

  • David
David Wilson
  • 128
  • 2
  • 7