Contents

init(type:localizedTitle:localizedSubtitle:icon:userInfo:)

Creates an immutable Home Screen dynamic quick action with user-visible title, icon, and user info dictionary.

Declaration

init(type: String, localizedTitle: String, localizedSubtitle: String?, icon: UIApplicationShortcutIcon?, userInfo: [String : any NSSecureCoding]? = nil)

Parameters

  • type:

    The required, app-defined type of the Home Screen quick action.

  • localizedTitle:

    The required, user-visible title of the Home Screen quick action.

  • localizedSubtitle:

    The optional, user-visible subtitle of the Home Screen quick action.

  • icon:

    The optional icon for the Home Screen quick action.

  • userInfo:

    App-defined information about the Home Screen quick action, to be used by your app to implement the action.

    One common, important use for this dictionary is to specify the version of your app. If a user installs an update for your app but hasn’t yet launched the update, pressing your Home Screen icon shows the dynamic quick actions for the previously-installed version. Including the app version in the userInfo dictionary lets you gracefully handle this scenario.

Return Value

An immutable Home Screen dynamic quick action item with a user-visible title, optional subtitle, optional icon, and optional user info dictionary.

See Also

Creating a Home Screen dynamic quick action