xcode FBSOpenApplicationErrorDomain 错误 1

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31350957/
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-09-15 07:27:32  来源:igfitidea点击:

FBSOpenApplicationErrorDomain error 1

iosxcodeios-simulatorswift2xcode7

提问by Douglas Ferreira

I'm trying to run my iOS app that was migrated from Swift 1.2to Swift 2.0in Xcode 7 using iPhone Simulator (any), I'm getting the following error:

我正在尝试使用 iPhone 模拟器(任何)运行从Xcode 7迁移Swift 1.2到 的iOS 应用程序Swift 2.0,我收到以下错误:

The operation couldn't be completed. (FBSOpenApplicationErrorDomain error 1.)

操作无法完成。(FBSOpenApplicationErrorDomain 错误 1。)

I already tried to reset simulator settings and content, quit Xcode, clean project, etc.

我已经尝试重置模拟器设置和内容、退出 Xcode、清理项目等。

采纳答案by Denis

I had the same error after updating Xcode to v7.0. After few hours struggling, I found that there was some empty environment variable setup to be passed for Run action in my active scheme (have no idea why it was there). Removing this empty environment variable resolved the issue immediately.

将 Xcode 更新到 v7.0 后,我遇到了同样的错误。经过几个小时的努力,我发现在我的活动方案中,有一些空的环境变量设置要传递给运行操作(不知道它为什么在那里)。删除这个空的环境变量立即解决了这个问题。

回答by i Code 4 Food

This error happens when a previous run of the app is still alive in the background, even if you clicked "Stop" in Xcode. Try manually killing the app in simulator itself: cmd+shift+H twice to open up running apps, drag up your app to kill it. Note cmd+shift+H is the shortcut to go to homescreen. Then start the new run and it should work fine :)

即使您在 Xcode 中单击了“停止”,当之前运行的应用程序在后台仍处于活动状态时,也会发生此错误。尝试在模拟器中手动杀死应用程序:cmd+shift+H 两次打开正在运行的应用程序,向上拖动您的应用程序以杀死它。注意 cmd+shift+H 是进入主屏幕的快捷方式。然后开始新的运行,它应该可以正常工作:)

回答by UnchartedWorks

  1. Simulator->Reset Content and Settings
  2. Quit Simulator
  3. Run the test cases again
  1. 模拟器->重置内容和设置
  2. 退出模拟器
  3. 再次运行测试用例

回答by NRR

In a tvOS app, you can go to simulator and delete the app in there and then re-run the program.

在 tvOS 应用程序中,您可以转到模拟器并删除其中的应用程序,然后重新运行该程序。

回答by damote

If the other fixes don't work

如果其他修复不起作用

Went through these attempts:

经历了这些尝试:

  1. Force quit the app in simulator
  2. reset simulator
  3. removed app from simulator
  4. Disabled App Transport Security globally (not recommended)
  5. Turned off all background modes issue always returned preventing debug sessions
  1. 强制退出模拟器中的应用程序
  2. 重置模拟器
  3. 从模拟器中删除应用程序
  4. 全局禁用应用程序传输安全(不推荐)
  5. 关闭所有后台模式问题总是返回阻止调试会话

This was my fix

这是我的修复

Seems like the schemes manager enables a field with no arguments that caused my issue.

似乎方案管理器启用了一个没有引起我的问​​题的参数的字段。

Product menu > Scheme > Edit Scheme > Run > Arguments > Environment Variables

If there is a checkmark there with an empty field next to it, then uncheck it.

如果那里有一个选中标记,旁边有一个空字段,则取消选中它。

I was getting the "1" error code. I hope this works for you too.

我收到“1”错误代码。我希望这也适用于你。

回答by Ohad Schneider

In my case I was able to resolve it by using a different simulator. It consistently happened with the iPhone 4Ssimulator, but once I switched to the iPhone 6 Plussimulator, the error was gone.

在我的情况下,我能够通过使用不同的模拟器来解决它。它一直发生在iPhone 4S模拟器上,但是一旦我切换到iPhone 6 Plus模拟器,错误就消失了。

回答by PKCLsoft

This error isn't (I believe) anything to do with a Facebook SDK. I'm getting this and I have no Facebook SDK at all.

这个错误(我相信)与 Facebook SDK 没有任何关系。我得到了这个,我根本没有 Facebook SDK。

What I found is that although Xcode shows no reasons for the error, was that the simulator log does.

我发现虽然 Xcode 没有显示错误原因,但模拟器日志确实如此。

When you get this error, the simulator will be running, so swap to it, and then from the "Debug" menu, select "Open system log...".

当您收到此错误时,模拟器将运行,因此切换到它,然后从“调试”菜单中选择“打开系统日志...”。

Once the log is on screen, traverse to it's end and you should see a lot more information (including a stack trace if you're lucky) about what went wrong.

一旦日志出现在屏幕上,遍历到它的末尾,您应该会看到更多关于出错的信息(如果幸运的话,包括堆栈跟踪)。

In my case it was an exception being thrown because a file asset was missing, or couldn't be found.

就我而言,这是由于文件资产丢失或找不到而引发的异常。

回答by Garry

In my case i solve it as .

就我而言,我将其解决为 .

Just dismiss the app on which you are working if running on background mode.

如果在后台模式下运行,只需关闭您正在使用的应用程序。

it works for me & hope it works for you .

它对我有用,希望对你有用。

回答by Munir Mehta

After lot of struggling, i think the issue is you might be trying to run the app which is running in the background. Stopping the app from xcode doesn't actually stop it (Strange right), you have to press home key which is cmd+shift+h twice, find your app and kill it. I am still trying to figure out better way of doing this as this is tedious, but at least this will work temporarily.

经过很多努力,我认为问题是您可能正在尝试运行在后台运行的应用程序。从 xcode 停止应用程序实际上并没有停止它(奇怪的正确),您必须按两次 cmd+shift+h 主页键,找到您的应用程序并杀死它。我仍在尝试找出更好的方法,因为这很乏味,但至少这会暂时起作用。

回答by Khurram Shehzad

Quitting(Command + Q) the simulator and launching it again solved the problem.

退出(Command + Q)模拟器并再次启动它解决了问题。