The data for a local or remote notification that was delivered to your app.


class UNNotification : NSObject


A UNNotification object contains the initial notification request, which contains the notification's payload, and the date on which the notification was delivered.

Don't create notification objects directly. When handling notifications, the system delivers notification objects to your UNUserNotificationCenterDelegate object. The UNUserNotificationCenter object also maintains the list of notifications that were previously delivered, and you use the getDeliveredNotifications(completionHandler:) method to retrieve those objects.


Getting the Notification Details

var request: UNNotificationRequest

The notification request containing the payload and trigger condition for the notification.

var date: Date

The delivery date of the notification.


Inherits From

See Also

Notification Requests

Scheduling a Notification Locally from Your App

Create and schedule notifications from your app when you want to get the user's attention.

class UNNotificationRequest

A request to schedule a local notification, which includes the content of the notification and the trigger conditions for delivery.