Instance Method

application(_:handleActionWithIdentifier:for:withResponseInfo:completionHandler:)

Called when your app has been activated by the user selecting an action from a local notification.

Declaration

optional func application(_ application: UIApplication, handleActionWithIdentifier identifier: String?, for notification: UILocalNotification, withResponseInfo responseInfo: [AnyHashable : Any], completionHandler: @escaping () -> Void)

Parameters

application

The app object that was activated for the user-selected action.

identifier

The identifier for the custom action.

notification

The local notification object that was triggered.

responseInfo

The data dictionary sent by the action.

completionHandler

A block that you must call when you are finished performing the action.

Discussion

A nil value in the identifier parameter indicates the default action.

Call the completion handler as soon as you’ve finished handling the action.

See Also

Deprecated Symbols

func application(UIApplication, didRegister: UIUserNotificationSettings)

Called to tell the delegate the types of local and remote notifications that can be used to get the user’s attention.

Deprecated
func application(UIApplication, didReceive: UILocalNotification)

Sent to the delegate when a running app receives a local notification.

Deprecated
func application(UIApplication, didReceiveRemoteNotification: [AnyHashable : Any])

Called when your app has received a remote notification.

Deprecated
func application(UIApplication, handleActionWithIdentifier: String?, for: UILocalNotification, completionHandler: () -> Void)

Called when your app has been activated because user selected a custom action from the alert panel of a local notification.

Deprecated
func application(UIApplication, handleActionWithIdentifier: String?, forRemoteNotification: [AnyHashable : Any], completionHandler: () -> Void)

Tells the app delegate to perform the custom action specified by a remote notification.

Deprecated
func application(UIApplication, handleOpen: URL)

Asks the delegate to open a resource identified by URL.

Deprecated
func application(UIApplication, open: URL, sourceApplication: String?, annotation: Any)

Asks the delegate to open a resource identified by a URL.

Deprecated