UserNotifications lets you schedule, deliver, and handle local and remote user notifications, including their content, actions, attachments, and triggers. You compose a notification with UNMutableNotificationContent, attach media through UNNotificationAttachment, and choose when it fires using a UNNotificationTrigger such as UNTimeIntervalNotificationTrigger, UNCalendarNotificationTrigger, or UNPushNotificationTrigger, then submit it as a UNNotificationRequest to the UNUserNotificationCenter. Request authorization with UNAuthorizationOptions, define interactive UNNotificationAction and UNNotificationCategory groupings, and respond to delivered notifications and user input through UNUserNotificationCenterDelegate, UNNotificationResponse, and UNTextInputNotificationResponse. With UNNotificationServiceExtension you can modify the content of incoming remote notifications before they are presented.
Notification Center 2
The central object for requesting authorization and scheduling, managing, and responding to notifications.
- ClUNUserNotificationCenteriOS 10.0+The central object for managing notification activities, including authorization, scheduling, and delivery.
- PrUNUserNotificationCenterDelegateiOS 10.0+An interface for handling incoming notifications and the user's responses to them.
Notification Content 7
Types that describe the payload, sound, and media of a notification.
- ClUNNotificationContentiOS 10.0+The read-only data, such as title, body, and badge, associated with a notification.
- ClUNMutableNotificationContentiOS 10.0+The editable content you compose when scheduling a local notification.
- PrUNNotificationContentProvidingiOS 15.0+A protocol adopted by types that provide content for a notification.
- ClUNNotificationAttachmentiOS 10.0+An object representing media, such as an image, sound, or video, attached to a notification.
- ClUNNotificationSoundiOS 10.0+An object representing the sound played when a notification is delivered.
- StUNNotificationSoundNameA structure that identifies a notification sound by name.
- ClUNNotificationAttributedMessageContextiOS 18.0+An object that provides attributed message context for displaying a communication notification.
Notification Requests 2
Types that bundle content with a trigger and represent scheduled and delivered notifications.
- ClUNNotificationRequestiOS 10.0+A request to schedule a local notification, pairing notification content with a delivery trigger.
- ClUNNotificationiOS 10.0+An object that represents a notification that has been delivered to the user.
Triggers 4
Conditions that determine when a notification is delivered.
- ClUNNotificationTriggeriOS 10.0+The abstract base class for conditions that cause a notification to be delivered.
- ClUNTimeIntervalNotificationTriggeriOS 10.0+A trigger that delivers a notification after a specified time interval elapses.
- ClUNCalendarNotificationTriggeriOS 10.0+A trigger that delivers a notification at a specified date and time.
- ClUNPushNotificationTriggeriOS 10.0+A trigger indicating that a notification was delivered through Apple Push Notification service.
Actions and Categories 6
Interactive buttons and groupings that let users respond to a notification.
- ClUNNotificationActioniOS 10.0+An object that describes a button the user can tap to respond to a delivered notification.
- ClUNTextInputNotificationActioniOS 10.0+An action that accepts text input from the user when responding to a notification.
- ClUNNotificationActionIconiOS 15.0+An object that defines the icon displayed alongside a notification action.
- ClUNNotificationCategoryiOS 10.0+An object that defines a type of notification along with the actions the user can take in response.
- StUNNotificationActionOptionsiOS 10.0+Options that configure the behavior of a notification action.
- StUNNotificationCategoryOptionsiOS 10.0+Options that configure the behavior of a notification category.
Responses 2
Types that capture how a user interacted with a delivered notification.
- ClUNNotificationResponseiOS 10.0+An object describing the user's response to a delivered notification.
- ClUNTextInputNotificationResponseiOS 10.0+A response that contains the text the user entered when replying to a notification.
Service Extension 1
Support for modifying the content of incoming remote notifications before they are presented.
- ClUNNotificationServiceExtensioniOS 10.0+An object that modifies the content of a remote notification before it is delivered to the user.
Authorization and Settings 8
Types that describe a user's notification preferences and the permissions your app has been granted.
- ClUNNotificationSettingsiOS 10.0+An object reporting the notification-related settings and authorization status for your app.
- StUNAuthorizationOptionsiOS 10.0+Options that specify the notification interactions your app requests authorization to use.
- EnUNAuthorizationStatusiOS 10.0+Constants that indicate whether the user has authorized your app to deliver notifications.
- EnUNNotificationSettingiOS 10.0+Constants that indicate whether a specific notification feature is enabled, disabled, or unsupported.
- StUNNotificationPresentationOptionsiOS 10.0+Options that determine how a notification is presented while the app is in the foreground.
- EnUNNotificationInterruptionLeveliOS 15.0+Constants that indicate the importance and delivery timing of a notification.
- EnUNAlertStyleiOS 10.0+Constants that indicate the style used to present alert-based notifications.
- EnUNShowPreviewsSettingiOS 11.0+Constants that indicate when the system shows notification content previews.
Errors 1
The error type reported by UserNotifications operations.
- StUNErroriOS 10.0+An error type describing failures encountered while working with notifications.