Instance Property

criticalAlertSetting

The authorization status to play sounds for critical alerts.

Declaration

iOS, Mac Catalyst, watchOS
@property(readonly, nonatomic) UNNotificationSetting criticalAlertSetting;
macOS
@property(readonly, atomic) UNNotificationSetting criticalAlertSetting;

Discussion

When UNNotificationSettingEnabled, 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 defaultCriticalSound 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

notificationCenterSetting

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

lockScreenSetting

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

carPlaySetting

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

alertSetting

The authorization status for displaying alerts.

badgeSetting

The authorization status for badging your app’s icon.

soundSetting

The authorization status for playing sounds for incoming notifications.

UNNotificationSetting

Constants indicating the current status of a notification setting.