Post marked as unsolved
Click to stop watching this post.
You have stopped watching this post. Click to start watching again.
Post marked as unsolved with 0 replies
139
Views
suggest shortcut with multiple parameters: INVoiceShortcutCenter.shared.setShortcutSuggestions
Don't find proper way for suggesting shortcut with multiple parameters, it shows long vertical list when suggest individual shortcut with different parameter value, instead of showing horizontal list of actions as shown in video.
There is log drink shortcut and it can have different drink types which it asks at run time
how to suggest using INVoiceShortcutCenter.shared.setShortcutSuggestions so it shows actions like streaks app shown in video? For me it shows vertical list, individual shortcut in shortcuts app
Sharing code here:
for drink in drinks {
let logDrink = LogDrinkIntent()
logDrink.drinkType = DrinkType(identifier: drink.drinkId!, display: drink.name!.localized)
let shortcut = INShortcut(intent: logDrink)
shortcuts.append(shortcut!)
}
	 INVoiceShortcutCenter.shared.setShortcutSuggestions(shortcuts)
}