Instance Property

criticalAlertSetting

The authorization status to play sounds for critical alerts.

Declaration

var criticalAlertSetting: UNNotificationSetting { get }

Discussion

When UNNotificationSetting.enabled, this property authorizes the app to play critical sounds that ignore Do Not Disturb and the device’s mute switch.

For local notifications, the system attempts to play a critical sound when the sound property of the UNNotificationContent object contains an object returned by the defaultCritical property, the criticalSoundNamed(_:) method, or a related method.

For remote notifications, the system attempts to play a critical sound when the notification’s payload contains a sound directory that contains the critical key.

Critical alerts require a special entitlement issued by Apple.

See Also

Getting Device-Specific Settings

var notificationCenterSetting: UNNotificationSetting

The setting that indicates whether your app’s notifications are displayed in Notification Center.

var lockScreenSetting: UNNotificationSetting

The setting that indicates whether your app’s notifications appear onscreen when the device is locked.

var carPlaySetting: UNNotificationSetting

The setting that indicates whether your app’s notifications may be displayed in a CarPlay environment.

var alertSetting: UNNotificationSetting

The authorization status for displaying alerts.

var badgeSetting: UNNotificationSetting

The authorization status for badging your app’s icon.

var soundSetting: UNNotificationSetting

The authorization status for playing sounds for incoming notifications.

enum UNNotificationSetting

Constants indicating the current status of a notification setting.