Contents

UNNotificationSettings

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

Declaration

class UNNotificationSettings

Mentioned in

Overview

A UNNotificationSettings object contains the current authorization status and notification-related settings for your app. Apps must receive authorization to schedule notifications and to interact with the user. Apps that run in CarPlay must similarly receive authorization to do so. Use this object to determine what notification-related actions your app can perform. You might then use that information to enable, disable, or adjust your app’s notification-related behaviors. Regardless of whether you take action, the system enforces your app’s settings by preventing denied interactions from occurring.

You don’t create instances of this class directly. Instead, call the getNotificationSettings(completionHandler:) method of your app’s UNUserNotificationCenter object to get the current settings.

For more information about requesting authorization for user interactions, see UNUserNotificationCenter.

Topics

Getting the Authorization Status

Getting Device-Specific Settings

Getting Interface Settings

Instance Properties

Initializers

See Also

Notification management