Contents

UNTextInputNotificationResponse

The user’s response to an actionable notification, including any custom text that the user typed or dictated.

Declaration

class UNTextInputNotificationResponse

Overview

The system delivers a UNTextInputNotificationResponse object to your app so that you can process user-provided text content. When defining your categories, you can specify an UNTextInputNotificationAction object instead of an UNNotificationAction object for your action. If you do, the system creates an UNTextInputNotificationResponse object when the user selects the accompanying action, and it fills the userText property with any user-entered text.

You don’t create UNTextInputNotificationResponse objects yourself. Instead, the shared user notification center object creates them and delivers them to the userNotificationCenter(_:didReceive:withCompletionHandler:) method of its delegate object. Use that method to extract any needed information from the response object and take appropriate action.

For more information about responding to actions, see Handling notifications and notification-related actions.

Topics

Getting the Text Response

See Also

Notification responses