The user’s response to an actionable notification, including any custom text that the user typed or dictated.
- iOS 10.0+
- macOS 10.14+
- Mac Catalyst 13.0+
- watchOS 3.0+
The system delivers a
UNText object to your app so that you can process user-provided text content. When defining your categories, you can specify an
UNText object instead of an
UNNotification object for your action. If you do, the system creates an
UNText object when the user selects the accompanying action, and it fills the
user property with any user-entered text.
You don't create
UNText objects yourself. Instead, the shared user notification center object creates them and delivers them to the
user 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.