Contents

init(intent:phrases:shortTitle:systemImageName:parameterPresentation:)

Initializes an App Shortcut with phrases that run the app intent, a title, an image, and specified parameters.

Declaration

init<Intent, Value, Parameter, ParameterKeyPath>(intent: Intent, phrases: [AppShortcutPhrase<Intent>], shortTitle: LocalizedStringResource, systemImageName: String, parameterPresentation: AppShortcutParameterPresentation<Intent, Value, Parameter, ParameterKeyPath>) where Intent : AppIntent, Value : _IntentValue, Value : Sendable, Parameter : IntentParameter<Value>, ParameterKeyPath : KeyPath<Intent, Parameter>

Parameters

  • intent:

    The AppIntent associated with the AppShortcut.

  • phrases:

    An array of AppShortcutPhrases associated with the AppShortcut.

  • shortTitle:

    A LocalizedStringResource representing the short title of the AppShortcut.

  • systemImageName:

    A String representing the system image name for the AppShortcut.

  • parameterPresentation:

    An AppShortcutParameterPresentation object associated with the AppShortcut.

Discussion

Use this initializer to create an App Shortcut for your app intent that people discover in the Shortcuts app and that they can run using the Action button on supported iPhone models.

See Also

Creating an app shortcut