【问题标题】:iOS 14 getAllVoiceShortcuts returning LaunchServices errorsiOS 14 getAllVoiceShortcuts 返回 LaunchServices 错误
【发布时间】:2020-09-16 12:00:56
【问题描述】:

在一个完全空白的 Xcode 项目中,我只是调用:

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        INVoiceShortcutCenter.shared.getAllVoiceShortcuts { (shortcuts, error) in
        }
    }
}

此日志失败:

[default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=271, _LSFunction=-[_LSDReadClient getServerStoreWithCompletionHandler:]}

这会重试 20 次,直到放弃。

Siri 功能已添加到应用程序中。仅在 iOS 14 GM 和 Xcode 12 GM 中的物理设备上发生。 任何帮助将不胜感激。

【问题讨论】:

  • 当我加载 INUIAddVoiceShortcutButton 时,我也会重试 10 次,所以这似乎是 SiriKit 的一般问题,但我还没有找到一个好的解决方法。

标签: ios14 sirishortcuts


【解决方案1】:

我有同样的问题(如你所说,仅在物理设备中),但我有 10 次重试,而不是 20 次。 在 iOS 14.0 之前我没有错误,所以可能是 SiriKit 中的一些错误。 我注意到这只会发生一次 - 当你下次调用它时,没有错误。 所以,现在,我在 AppDelegate 中添加了这个调用 - 当应用程序启动时,因为错误会冻结 UI 一秒钟。

【讨论】:

    猜你喜欢
    • 2012-09-11
    • 2015-08-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多