Class

UNTextInputNotificationResponse

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

Declaration

class UNTextInputNotificationResponse : UNNotificationResponse

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

var userText: String

The text response provided by the user.

Relationships

Conforms To

See Also

Notification Responses

Handling Notifications and Notification-Related Actions

Respond to user interactions with the system’s notification interfaces, including handling your app's custom actions.

class UNNotificationResponse

The user’s response to an actionable notification.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software