Contents

INShortcutAvailabilityOptions

Defined contexts in which an intent or activity might be relevant to a user.

Declaration

struct INShortcutAvailabilityOptions

Overview

The system uses the set of availability options in a donated shortcut to provide the user with shortcuts relevant in a particular context or circumstance. For example, a meditation app could include an intent with sleepMindfulness in its shortcutAvailability options when calling setShortcutSuggestions(_:). Then the Wind Down configuration screen in the Health app includes that intent in the Mindfulness category when guiding the user to set up shortcuts.

Provide accurate availability options when you suggest shortcuts to INVoiceShortcutCenter with setShortcutSuggestions(_:), and when you donate shortcuts based on user actions. If none of the options apply to an intent, provide an empty OptionSet.

For more information on donating shortcuts effectively, see Donating Shortcuts.

Topics

Providing Contexts

Creating an Availability Set

See Also

Shortcuts and Donations