A type used to prevent direct execution of actions on
ConditionalFeature(s), such that
ActionSession only has functions to perform actions using
VerifiedActionBinding and not
perform() using a
This makes it impossible to directly perform an action of a conditional feature without first requesting access to it, as these request instances are only created by the framework and must be used to perform such actions.
The protocol extensions on
ConditionalFeature only supports
request and not
perform, forcing the caller to test if the feature is available first and at least
explicitly ignore the
feature not available path, but hopefully provide a code path for that.
Call to invoke the system
Add Voice Shortcutview controller for the given input to the conditionally-available action represented by this action request. The action must support creating an
INIntentfor a custom intent extension to be invoked, or creating an
NSUserActivityusing Flint’s Activities conventions.
This will create a shortcut that invokes the
INIntentreturned by the
intent(for:)function. If that function returns nil (or is not defined by your
Action), it will attempt to create an
Actionand instead use that. If the
Actiondoes not support
Activities, this will fail.
- param input: The input to pass to the action when it is later invoked from the Siri Shortcut by the user.
- param presenter: The
UIViewControllerto use to present the view controller
@available(iOS 12, *) public func addVoiceShortcut(for input: ActionType.InputType, presenter: UIViewController)