A request to schedule a local notification, which includes the content of the notification and the trigger conditions for delivery.
- iOS 10.0+
- macOS 10.14+
- UIKit for Mac 13.0+Beta
- tvOS 10.0+
- watchOS 3.0+
UNNotification object when you want to schedule the delivery of a local notification. A notification request object contains a
UNNotification object with the payload to be delivered, and it contains the
UNNotification object with the conditions that trigger the delivery of the notification. To schedule the delivery of your notification, pass your request object to the
add(_: method of the shared user notification center object.
After scheduling a request, you interact with
UNNotification objects in the following ways:
View your app's pending notifications by calling the
getmethod of your shared user notification center object.
Pending Notification Requests(completion Handler:)
Use the request's
identifierto remove delivered notifications from Notification Center.
When receiving a local or remote notification, use the provided
UNNotification object to fetch details about the notification.