Framework

UserNotifications

Overview

The UserNotifications framework (UserNotifications.framework) supports the delivery and handling of local and remote notifications. You use the classes of this framework to schedule the delivery of local notifications based on specific conditions, such as time or location. Apps and extensions also use this framework to receive and potentially modify local and remote notifications when they are delivered to the user’s device.

Topics

First Steps

UNUserNotificationCenter

The central object for managing notification-related activities for your app or app extension.

UNUserNotificationCenterDelegate

The interface for handling notification-related interactions in your app or app extension.

UNNotificationSettings

The object for managing notification-related settings and the authorization status of your app

Notifications

Request the delivery of a local notification and receive a response associated with a delivered notification.

UNNotificationRequest

An object you use to specify a notification’s content and the condition that triggers its delivery.

UNNotification

The data for a delivered notification.

UNNotificationResponse

The user’s response to an actionable notification.

Notification Content

UNMutableNotificationContent

The editable content for a notification.

UNNotificationContent

The uneditable content of a local or remote notification.

UNNotificationAttachment

A media file associated with a notification.

UNNotificationSound

A sound to be played when a notification is delivered.

Categories and Actions

Define the actions to display with a notification using categories.

UNNotificationCategory

A definition of a type of notification that your app supports and the custom actions to display with it.

UNNotificationAction

A task to perform in response to a delivered notification.

UNTextInputNotificationAction

An action that can accept user-specified text.

UNTextInputNotificationResponse

The user’s response to an actionable notification, including any custom text that the user typed or dictated.

Triggers

Define the trigger conditions for delivering local notifications. Detect when a notification was delivered from Apple Push Notification Service.

UNCalendarNotificationTrigger

The date and time at which to deliver a local notification.

UNTimeIntervalNotificationTrigger

The time that must expire before the delivery of a local notification.

UNLocationNotificationTrigger

The geographic location that the user must reach to enable the delivery of a local notification.

UNPushNotificationTrigger

An object that indicates that a notification was sent from the Apple Push Notification Service.

UNNotificationTrigger

The common behavior for subclasses that trigger the delivery of a notification.

Service Extension

Modify notifications before they are delivered to your app using a Notification Service app extension.

UNNotificationServiceExtension

An object that modifies the content of a remote notification before it is delivered to the user.