Class
NotificationSettings
Description
This object contains the current notification settings for the app as set by the user.
Properties
Name |
Type |
Read-Only |
Shared |
---|---|---|---|
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
Enumerations
NotificationSettings.AlertStyles
AlertStyles
The various ways alerts can be displayed.
Enum |
---|
None |
Banner |
Alert |
NotificationSettings.AuthorizationStatuses
AuthorizationStatuses
The various status of authorization.
Enum |
---|
NotDetermined |
Denied |
Authorized |
Provisional |
Ephemeral |
NotificationSettings.DeviceSettings
DeviceSettings
The statuses of any particular device setting.
Enum |
---|
NotSupported |
Disabled |
Enabled |
NotificationSettings.PreviewSettings
PreviewSettings
The conditions under which to display previews.
Enum |
---|
Always |
WhenAuthenticated |
Never |
Property descriptions
NotificationSettings.AlertStyle
AlertStyle As AlertStyles
The various ways alerts can be displayed.
This property is read-only.
NotificationSettings.AuthorizationStatus
AuthorizationStatus As AuthorizationStatuses
The various status of authorization.
This property is read-only.
NotificationSettings.PlaysAnnouncements
PlaysAnnouncements As DeviceSettings
If true, the app's notifications play announcements.
This property is read-only.
This will cause Siri to play the notification if the user is using AirPods.
NotificationSettings.PlaysSounds
PlaysSounds As DeviceSettings
If true, the app's notifications play sounds.
This property is read-only.
NotificationSettings.ProvidesInAppSettings
ProvidesInAppSettings As Boolean
Whether or not the OS can display a link from notification settings to the app.
This property is read-only.
NotificationSettings.ShowsAlerts
ShowsAlerts As DeviceSettings
If true, the app's notifications show alerts.
This property is read-only.
NotificationSettings.ShowsBadges
ShowsBadges As DeviceSettings
If true, the app's notifications show badges.
This property is read-only.
NotificationSettings.ShowsCriticalAlerts
ShowsCriticalAlerts As DeviceSettings
If true, the app is allowed to show Critical Alerts (requires a special entitlement from Apple because it's meant for government agencies).
This property is read-only.
NotificationSettings.ShowsInCarPlay
ShowsInCarPlay As DeviceSettings
If true, the app's notifications show alerts in CarPlay.
This property is read-only.
NotificationSettings.ShowsInNotificationCenter
ShowsInNotificationCenter As DeviceSettings
If true, the app's notifications appear in the Notification Center.
This property is read-only.
NotificationSettings.ShowsOnLockScreen
ShowsOnLockScreen As DeviceSettings
If true, the app's notifications show on the lock screen.
This property is read-only.
NotificationSettings.ShowsPreviews
ShowsPreviews As PreviewSettings
If true, the app's notifications are allowed to show previews.
This property is read-only.
Notes
With this class, you can determine what the user's notification settings are for your app.
Compatibility
iOS projects on the iOS operating system.