Contains the user’s response to an actionable notification, including any custom text that the user typed or dictated.
- iOS 10.0+
- watchOS 3.0+
UNText object is the response object created for an action that allows the user to enter free form text. When defining the actions to display for your notifications, you can use an
UNText object to represent the action instead of an
UNNotification object. Apps use text-input actions when it makes sense for the user to provide custom text as part of the response. For example, a messaging app might let the user supply a custom response to an incoming message. When the user selects the action, the system creates an
UNText object and fills its
user property with any user-provided text.
You do not create instances of this class yourself. When the user selects a text-input action from the notification interface, the user notification center object delivers an instance of this class to the
user method of its delegate object. Implement that delegate method and use it to extract any needed information from the response object.
For information about the other response-related properties, see