Contents

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

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

Declaration

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

Parameters

  • application:

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

  • identifier:

    The identifier for the custom action.

  • userInfo:

    A dictionary that contains information related to the remote notification, potentially including a badge number for the app icon, an alert sound, an alert message to display to the user, a notification identifier, and custom data. The provider originates it as a JSON-defined dictionary that iOS converts to an Nsdictionary object; the dictionary might contain only property-list objects plus Nsnull.

  • 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