ios 模拟器错误 FBSSystemServiceDomain 代码 4

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24763743/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 01:23:46  来源:igfitidea点击:

Simulator error FBSSystemServiceDomain code 4

iosios-simulatorxcode6ios8.1

提问by Gruntcakes

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)

Screenshot for error

错误截图

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.

它使用 XCode 6 Beta,应用程序在 Swift 中,它链接到 Obj-C 静态库。它在设备上运行良好。

Any ideas?

有任何想法吗?

回答by Marie

Go to the iOS Simulator menu and select Reset Content and Settings.

转到 iOS 模拟器菜单并选择重置内容和设置。

Alternatively, you could quit and reopen the Simulator.

或者,您可以退出并重新打开模拟器。

enter image description here

在此处输入图片说明

回答by Francesco

It's enough to quit and re-open the Simulator, this has been verified in the Xcode 6.0.1 release.

退出并重新打开模拟器就足够了,这已在 Xcode 6.0.1 版本中得到验证。

回答by Jeremy Huddleston Sequoia

This issue is discussed in the Xcode 6 Release Notes

这个问题在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)

在 iOS 模拟器上测试可能会产生一个错误,表明应用程序无法安装或启动。重新运行测试或开始另一个集成。(17733855)

And is also discussed in my sticky post in the Apple Developer Forums for iOS Simulator Debugging

并且也在我在 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 launchUpon 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 newprocess 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

"(Domain = FBSOpenApplicationErrorDomain, Code = 4)", "(Domain NSPOSIXErrorDomain, Code = 3"), "Domain=IDEUnitTestsOperationsObserverErrorDomain Code=3", "Lost Connection to ...", "Debugger disconnected", 或者应用程序被 SIGKILLed启动不久安装应用程序后,SpringBoard 将 SIGKILL 该应用程序的进程以强制使用新的可执行文件重新启动该应用程序。问题是存在竞争条件,因此 SpringBoard 可能会意外地 SIGKILL 一个新的我们刚刚启动的流程而不是旧流程。您收到的各种错误消息中的哪一条取决于在启动过程中发送 SIGKILL 的确切时间。通常,这不应该发生,因此建议您再试一次(抱歉 =/)。如果您发现这种情况一直发生在您身上或发生的频率超出您的承受能力,我们非常抱歉。我们知道磁盘 I/O 较慢的系统会比较快的系统更频繁地看到这种情况,因此如果您使用的是 NFS 主目录,您可能需要为模拟器数据创建一个本地目录并设置一个指向它的 simlink ~/库/开发人员/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.

请注意,最初的问题是关于域 FBSSystemServiceDomain,而我在 devforums 上的帖子提到了 FBSOpenApplicationErrorDomain。FBSSystemServiceDomain 用于较早版本的 iOS 8.0 测试版。

回答by user1824791

You can either Reset Content and Setting or just close iOS Simulator and relaunch.

您可以重置内容和设置,也可以关闭 iOS 模拟器并重新启动。

回答by Steve

None of the solutions worked for me including the accepted answer of "Reset Content and Settings".

没有一个解决方案对我有用,包括“重置内容和设置”的公认答案。

The only way I was able to get it to work was by downloading a previous iOS simulator version which let me install the app.

我能够让它工作的唯一方法是下载以前的 iOS 模拟器版本,让我安装该应用程序。

回答by Jayprakash Dubey

I suggest you to use stable version of Xcode 6.1.

我建议您使用稳定版的 Xcode 6.1。

FBSOpenApplicationErrorDomain, code =4 error suggests it is an error from 
cached data on the simulator.

There are three possible solutions :

有三种可能的解决方案:

  1. Clean simulator. Use (Command + Shift + k)as shortcut key or goto Product -> Clean

  2. Quit simulatorand relaunch it.

  3. Open simulator. Select iOS simulator -> Reset contents and settings...

  1. 清洁模拟器。使用 ( Command + Shift + k)作为快捷键或转到Product -> Clean

  2. 退出模拟器并重新启动它。

  3. 打开模拟器。选择 iOS 模拟器 ->重置内容和设置...

Screenshot for step 3

步骤 3 的屏幕截图