Simulator error FBSSystemServiceDomain code 4
I'm trying to run an app in the simulator but get this error message:
Unable to run app in Simulator
An error was encountered while running (Domain = FBSSystemServiceDomain, Code = 4)
I've not seen any previous references to this from googling around.
Its using XCode 6 Beta, the app is in Swift which links to a Obj-C static library. It runs fine on the device.
Any ideas?
Solution 1:
Go to the iOS Simulator menu and select Reset Content and Settings.
Alternatively, you could quit and reopen the Simulator.
Solution 2:
It's enough to quit and re-open the Simulator, this has been verified in the Xcode 6.0.1 release.
Solution 3:
This issue is discussed in the Xcode 6 Release Notes
Testing on iOS Simulator may produce an error indicating that the application could not be installed or launched. Re-run testing or start another integration. (17733855)
And is also discussed in my sticky post in the Apple Developer Forums for iOS Simulator Debugging
"(Domain = FBSOpenApplicationErrorDomain, Code = 4)", "(Domain NSPOSIXErrorDomain, Code = 3"), "Domain=IDEUnitTestsOperationsObserverErrorDomain Code=3", "Lost Connection to ...", "Debugger disconnected", or app getting SIGKILLed soon after launch Upon installation of an app, SpringBoard will SIGKILL that app's process in order to force a relaunch of the app with the new executable. The problem is that there is a race condition whereby SpringBoard may accidentally SIGKILL a new process that we just launched rather than the old process. Which of the various error messages you get depends on exactly when in the launch process the SIGKILL was delivered. Normally, this shouldn't happen, so the advise is to just try again (sorry =/). If you find that this happes to you all the time or more frequently than you can tollerate, we are incredibly sorry. We are aware that systems with slower disk I/O will see this happen more frequently than faster systems, so if you are using an NFS home directory, you may want to create a local directory for your simulator data and setup a simlink to it from ~/Library/Developer/CoreSimulator
Note that the original question is about domain FBSSystemServiceDomain whereas my post on devforums mentions FBSOpenApplicationErrorDomain. FBSSystemServiceDomain was used in earlier versions of iOS 8.0 betas.