TechnologiesUI & App Frameworks

UserNotificationsUI

iOSmacOStvOSwatchOSvisionOS

UserNotificationsUI provides custom UI for notification content extensions, letting you replace the default appearance of a delivered notification with your own interface. You adopt the UNNotificationContentExtension protocol to receive and display notification content, and respond to interaction by returning a UNNotificationContentExtensionResponseOption. The framework also supports media button controls in notifications, using UNNotificationContentExtensionMediaPlayPauseButtonType to configure play and pause behavior. It is available on iOS, macOS, tvOS, watchOS, and visionOS.

Custom Notification Content 1

Adopt this protocol to display a custom interface for a delivered notification's content.

  • Pr
    UNNotificationContentExtensioniOS 10.0+
    An object that presents a custom interface for a delivered local or remote

Responding to Interaction 1

Control how the system dismisses the notification interface after the user acts on it.

  • En
    UNNotificationContentExtensionResponseOptioniOS 10.0+
    Constants indicating the preferred response to a notification.

Media Button Controls 1

Configure the appearance and behavior of media playback buttons shown in the notification.

  • En
    UNNotificationContentExtensionMediaPlayPauseButtonTypeiOS 10.0+
    Constants indicating the type of media button to display.

Extends 1

NSExtensionContext
← UI & App Frameworks