【问题标题】:'Use of the class <INPreferences: 0x600000cd64a0> from an app requires the entitlement com.apple.developer.siri. Did you enable the Siri'从应用程序使用类 <INPreferences: 0x600000cd64a0> 需要权利 com.apple.developer.siri。你启用了 Siri
【发布时间】:2020-11-12 08:31:53
【问题描述】:

我使用 swift 5 和 Xcode 12。 我启用了 Siri 并在我的 ViewController 中添加了“import Intents”

在viewdidload中:

override func viewDidLoad() {
   super.viewDidLoad()

   INPreferences.requestSiriAuthorization { (status) in }
}

我的应用崩溃了:

libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Use of the class <INPreferences: 0x600000cd64a0> from an app requires the entitlement com.apple.developer.siri. Did you enable the Siri capability in your Xcode project?'
terminating with uncaught exception of type NSException

有什么想法吗? :/

【问题讨论】:

    标签: swift siri


    【解决方案1】:

    转到 Signing &amp; Capabilities -&gt; Capability -&gt; Siri(double click) 并等待配置文件更新。

    看到下图所示的Siri,然后运行您的项目。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-04-14
    • 2020-09-21
    • 1970-01-01
    • 2013-02-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多