如何解决'从应用程序中使用类<INPreferences:0x600000cd64a0>要求具有权利com.apple.developer.siri您启用了Siri吗
我使用Swift 5和Xcode 12。 我启用了Siri并在ViewController中添加了“导入意图”
在视图加载中:
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
有什么主意吗? :/
解决方法
转到cake = bake(nlp,from_pretrained='bert-base-cased',top_k=3)
nlp.add_pipe(cake,last=True)
doc = nlp("This is a test but obviously you need to place a bigger document here to extract meaningful keyphrases")
print(doc._.extracted_phrases)
并等待供应配置文件更新。
一旦您看到Signing & Capabilities -> Capability -> Siri(double click)
,如下图所示,然后运行您的项目。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。