【发布时间】: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
有什么想法吗? :/
【问题讨论】: