INCreateNoteIntent groupName always null
问题描述:
使用Sirikit创建笔记时,我可以解析标题和内容,但不能解析groupName。 Siri理解文件夹名称,但po意图总是返回groupName =“”。INCreateNoteIntent groupName always null
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
答
什么是你给予Siri的句子? 你可以在这里找到一个很好的教程:http://chariotsolutions.com/blog/post/enabling-siri-integration-sirikit/
我编辑了这个问题。 MERCI –