The uneditable content of a notification.
- iOS 10.0+
- macOS 10.14+
- Mac Catalyst 13.0+
- tvOS 10.0+
- watchOS 3.0+
UNNotification object contains the data associated with a notification. When your app receives a notification, the associated
UNNotification object contains an object of this type with the content that your app received. Use the content object to get the details of the notification, including the type of notification that was delivered, any custom data you stored in the
user dictionary before scheduling the notification, and any attachments.
Don't create instances of this class directly. For remote notifications, the contents of this object are derived from the JSON payload that your server sends to the APNS server. For local notifications, create a
UNMutable object, and configure the contents of that object instead.