8

I am not sure what I am doing wrong. But in this method

 INVoiceShortcutCenter.shared.getAllVoiceShortcuts { (vShortCuts, error) in
        print(vShortCuts)

    }

vShortCuts is an empty array.

var suggestions = [INShortcut]()
let userActivity = NSUserActivity.init(activityType: "com.riyaz.testactivity")
userActivity.title = "test activity"
let shortCut =  INShortcut.init(userActivity: userActivity)
suggestions.append(shortCut)

INVoiceShortcutCenter.shared.setShortcutSuggestions(suggestions)

I donated a suggestion Opened "Shortcuts app". Navigated to Gallery and Added the suggestion to Siri with a text.

However, The same text does not trigger the appdelegate's willContinueUserActivity

And also INVoiceShortcutCenter.shared.getAllVoiceShortcuts returns an empty array.

Any help appriciated.

riyaz
  • 1,093
  • 1
  • 8
  • 21

0 Answers0