Structure

UNAuthorizationOptions

Constants for requesting authorization to interact with the user.

Declaration

struct UNAuthorizationOptions

Topics

Options

static var badge: UNAuthorizationOptions

The ability to update the app’s badge.

static var sound: UNAuthorizationOptions

The ability to play sounds.

static var alert: UNAuthorizationOptions

The ability to display alerts.

static var carPlay: UNAuthorizationOptions

The ability to display notifications in a CarPlay environment.

static var criticalAlert: UNAuthorizationOptions

The ability to play sounds for critical alerts.

static var providesAppNotificationSettings: UNAuthorizationOptions

An option indicating the system should display a button for in-app notification settings.

static var provisional: UNAuthorizationOptions

The ability to post noninterrupting notifications provisionally to the Notification Center.

Relationships

Conforms To

See Also

Managing Settings and Authorization

func requestAuthorization(options: UNAuthorizationOptions = [], completionHandler: (Bool, Error?) -> Void)

Requests authorization to interact with the user when local and remote notifications are delivered to the user's device.

var supportsContentExtensions: Bool

A Boolean value indicating whether the current device supports notification content extensions.