Asks the delegate to process the user's response to a delivered notification.
- iOS 10.0+
- macOS 10.14+
- UIKit for Mac 13.0+Beta
- watchOS 3.0+
The shared user notification center object that received the notification.
The user’s response to the notification. This object contains the original notification and the identifier string for the selected action. If the action allowed the user to provide a textual response, this parameter contains a
Input Notification Response
The block to execute when you have finished processing the user’s response. You must execute this block at some point after processing the user's response to let the system know that you are done. The block has no return value or parameters.
Use this method to process the user's response to a notification. If the user selected one of your app's custom actions, the
response parameter contains the identifier for that action. (The response can also indicate that the user dismissed the notification interface, or launched your app, without selecting a custom action.) At the end of your implementation, call the
completion block to let the system know that you are done processing the user's response. If you do not implement this method, your app never responds to custom actions.
You specify your app’s notification types at app launch using
UNNotification objects, and you specify the custom actions for each type using
UNNotification objects. For information, see Declaring Your Actionable Notification Types.