ios - 应用程序激活时出错

标签 ios swift xcode

我在 xcode 日志中得到了这个:

[_UIRemoteKeyboards proxy]_block_invoke Failed to access remote service: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.UIKit.KeyboardManagement.hosted was invalidated from this process." UserInfo={NSDebugDescription=The connection to service named com.apple.UIKit.KeyboardManagement.hosted was invalidated from this process.}

知道是什么原因造成的吗?

最佳答案

此错误可能是因为您的键盘需要完全访问权限。

从键盘目标打开 info.plist

为键设置值

RequestsOpenAccess

您还可以通过以下方法确保您的键盘扩展具有完全访问权限

func hasOpenAccess() -> Bool {
    UIPasteboard.general.string = "TEST"
    return UIPasteboard.general.hasStrings
}

关于ios - 应用程序激活时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57161223/

相关文章:

ios - UIToolBar 位置到 UINavigationController 的顶部

ios - 为什么平均颜色不会产生黑色以外的结果?

ios - 滚动 tableView ios swift 的末尾

ios - 如何让导航栏上的 "Add"按钮执行某些操作?

iOS : Create a simple audio waveform animation

iphone - 在屏幕上随机移动两个或多个对象

ios - 在非弹跳的 UITableView 中滚动后,行选择在第一次点击时不起作用

ios - 核心数据操作中 100% CPU

string - 在 Swift 中转换字符和代码点

ios - 条件绑定(bind)必须有 Optional 类型,而不是 'String'