Initializer

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

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

Declaration

init(type: String, localizedTitle: String, localizedSubtitle: String?, icon: UIApplicationShortcutIcon?, userInfo: [String : 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 has not 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

init(type: String, localizedTitle: String)

Creates an immutable Home screen dynamic quick action with a user-visible title and no icon.