Instance Property

lockScreenSetting

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

Declaration

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

Discussion

Even if the user disables lock screen notifications, your notifications may still appear onscreen when the device is unlocked.

See Also

Getting Device-Specific Settings

notificationCenterSetting

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

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.

criticalAlertSetting

The authorization status to play sounds for critical alerts.

UNNotificationSetting

Constants indicating the current status of a notification setting.