使用Sirikit创建便笺时,我可以解析标题和内容,但不能解析groupName。Siri能够识别文件夹名,但是po intent总是返回groupName = "“。
func resolveGroupName(forCreateNote intent: INCreateNoteIntent, with completion: @escaping (INSpeakableStringResolutionResult) -> Swift.Void) {
if let groupName = intent.groupName {
NSLog("%@", groupName)
completion(INSpeakableStringResolutionResult.success(with: groupName))
} else {
completion(INSpeakableStringResolutionResult.needsValue()) //endless loop
}
}这只会在模拟器中发生。在设备上,它不会询问文件夹名称,也不会在断点处停止。不能在设备上调试siri扩展吗?
这句话似乎有点问题。如果我将这个siri查询直接放在模式中,它在模拟器中工作,并且我在日志中看到正确的组名'f‘:
Create a note called c in my f folder saying s in myappname但如果我替换f或s就不会了,这句话有错吗?我在哪里可以找到正确句子的例子?
我从WWDC演示文稿中摘录了以下内容:
Create a note called WWDC in my presentation folder saying SiriKit in UnicornNotes发布于 2017-06-28 21:45:09
你对Siri的判决是什么?你可以在这里找到一个很棒的教程:http://chariotsolutions.com/blog/post/enabling-siri-integration-sirikit/
https://stackoverflow.com/questions/44516522
复制相似问题