Xcode 7 (iOS 9) 通讯错误:<OS_xpc_error: <error: 0x10a1abb40>
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33104411/
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
Xcode 7 (iOS 9) Communications error: <OS_xpc_error: <error: 0x10a1abb40>
提问by Vaisakh
Can any one help me to figure out the following error I get when I run my application?
任何人都可以帮助我找出运行应用程序时遇到的以下错误吗?
Communications error: <OS_xpc_error: <error: 0x10a1abb40> { count = 1, contents = "XPCErrorDescription" => <string: 0x10a1abef0> { length = 22, contents = "Connection interrupted" } }>
Communications error: <OS_xpc_error: <error: 0x10a1abb40> { count = 1, contents = "XPCErrorDescription" => <string: 0x10a1abef0> { length = 22, contents = "Connection interrupted" } }>
回答by Yuri Kobets
If you are running your app in iOS simulator it uses XPC Services APIfor interprocess communication and any breakpoint or other interruptions can cause such an error.
如果您在 iOS 模拟器中运行您的应用程序,它会使用XPC 服务 API进行进程间通信,任何断点或其他中断都可能导致此类错误。
You can refer to this Apple Doc
你可以参考这个Apple Doc
In the section Handling Errors
在处理错误部分
Interruption handler—called when the process on the other end of the connection has crashed or has otherwise closed its connection.
中断处理程序——在连接另一端的进程崩溃或以其他方式关闭其连接时调用。
The debugging of app on device should not have such problems.
设备端app的调试应该不会有这样的问题。
回答by Jorge Irún
I had the same problem when running my app and keyboard extension (I'm building a custom keyboard). Since you do not provide enough information we don't know when this happens to you exactly.. so I'll leave this here in case you are working in an extension too, if not.. hope this will be useful to someone else.
我在运行我的应用程序和键盘扩展时遇到了同样的问题(我正在构建一个自定义键盘)。由于您没有提供足够的信息,我们不知道这种情况何时会发生在您身上……所以如果您也在扩展程序中工作,我会将其留在这里,如果没有的话……希望这对其他人有用。
- Open the info.plist from your Keyboard Target.
- Set Value "Yes" for key "RequestsOpenAccess"
- Run your App on device
- Go To Settings, General, Keyboard, Keyboards
- Select your keyboard
- Change "Allow Full Access" to True.
- 从键盘目标打开 info.plist。
- 为键“RequestsOpenAccess”设置值“Yes”
- 在设备上运行您的应用
- 转到设置,通用,键盘,键盘
- 选择你的键盘
- 将“允许完全访问”更改为 True。
回答by Svitlana
Please pay attention how often you are accessing to the Database. I also have the same problem. I am working with chat using Firebase. So in my case I made a mistake when I too often get/put data from/into DB.
请注意您访问数据库的频率。我也有同样的问题。我正在使用 Firebase 进行聊天。所以在我的情况下,当我经常从/向数据库获取/放入数据时我犯了一个错误。