INVoiceShortcutCenter
INVoiceShortcutCenter
INVoiceShortcutCenter Class of Intents Retrieve the user’s shortcuts and make shortcut suggestions.
class INVoiceShortcutCenterOverview
With Shortcut Center, your app can:
- Retrieve shortcuts associated with your app that the user added to Siri.
- Suggest shortcuts the user may want to add to Siri.
Before you can retrieve or suggest shortcuts, get a reference to the Shortcut Center from the shared class property.
To retrieve all shortcuts associated with your app, call getAllVoiceShortcuts(completion:)). To retrieve a particular shortcut, use the getVoiceShortcut(with:completion:)) method, passing in the shortcut’s identifier. These methods return shortcuts associated with your app that the user added to Siri using your app or the Settings app.
To suggest shortcuts for actions that the user hasn’t performed in your app but may want to add to Siri, call setShortcutSuggestions(:)), passing in a list of suggested shortcuts. The user views the suggestions in the Gallery of the Shortcuts app. For more information, see //com.apple.documentation/documentation/SiriKit/offering actions in the shortcuts app.