An object you use to specify a notification’s content and the condition that triggers its delivery.
- iOS 10.0+
- tvOS 10.0+
- watchOS 3.0+
UNNotification object is used to schedule a local notification and manages the content for a delivered notification. A notification request object contains a
UNNotification object with the contents of the notification. It also contains the
UNNotification object that specifies the conditions that trigger the delivery of the notification. For a delivered notification, you use these objects to fetch information about the notification.
To schedule a local notification, create an instance of this class using the
init(identifier: method and pass that instance to the
add(_: method of the singleton notification center object. When creating the object, you specify the content and trigger conditions to use for your notification.
For a delivered notification, the
UNNotification object stores an instance of this class in the
request property. Use that instance to retrieve the notification’s content and trigger conditions. To view the list of delivered notifications, call the notification center’s