Class

# NotificationSettings

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

This object contains the current notification settings for the app as set by the user.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                                        | Type                                                                | Read-Only | Shared |
|-----------------------------------------------------------------------------|---------------------------------------------------------------------|-----------|--------|
| `AlertStyle<notificationsettings.alertstyle>`                               | `AlertStyles<notificationsettings.alertstyles>`                     | ✓         |        |
| `AuthorizationStatus<notificationsettings.authorizationstatus>`             | `AuthorizationStatuses<notificationsettings.authorizationstatuses>` | ✓         |        |
| `PlaysAnnouncements<notificationsettings.playsannouncements>`               | `DeviceSettings<notificationsettings.devicesettings>`               | ✓         |        |
| `PlaysSounds<notificationsettings.playssounds>`                             | `DeviceSettings<notificationsettings.devicesettings>`               | ✓         |        |
| `ProvidesInAppSettings<notificationsettings.providesinappsettings>`         | `Boolean</api/data_types/boolean>`                                  | ✓         |        |
| `ShowsAlerts<notificationsettings.showsalerts>`                             | `DeviceSettings<notificationsettings.devicesettings>`               | ✓         |        |
| `ShowsBadges<notificationsettings.showsbadges>`                             | `DeviceSettings<notificationsettings.devicesettings>`               | ✓         |        |
| `ShowsCriticalAlerts<notificationsettings.showscriticalalerts>`             | `DeviceSettings<notificationsettings.devicesettings>`               | ✓         |        |
| `ShowsInCarPlay<notificationsettings.showsincarplay>`                       | `DeviceSettings<notificationsettings.devicesettings>`               | ✓         |        |
| `ShowsInNotificationCenter<notificationsettings.showsinnotificationcenter>` | `DeviceSettings<notificationsettings.devicesettings>`               | ✓         |        |
| `ShowsOnLockScreen<notificationsettings.showsonlockscreen>`                 | `DeviceSettings<notificationsettings.devicesettings>`               | ✓         |        |
| `ShowsPreviews<notificationsettings.showspreviews>`                         | `PreviewSettings<notificationsettings.previewsettings>`             | ✓         |        |

## Enumerations

<div id="notificationsettings.alertstyles">

<div class="rst-class">

forsearch

</div>

</div>

NotificationSettings.AlertStyles

### AlertStyles

> The various ways alerts can be displayed.
>
> | Enum   |
> |--------|
> | None   |
> | Banner |
> | Alert  |

<div id="notificationsettings.authorizationstatuses">

<div class="rst-class">

forsearch

</div>

</div>

NotificationSettings.AuthorizationStatuses

### AuthorizationStatuses

> The various status of authorization.
>
> | Enum          |
> |---------------|
> | NotDetermined |
> | Denied        |
> | Authorized    |
> | Provisional   |
> | Ephemeral     |

<div id="notificationsettings.devicesettings">

<div class="rst-class">

forsearch

</div>

</div>

NotificationSettings.DeviceSettings

### DeviceSettings

> The statuses of any particular device setting.
>
> | Enum         |
> |--------------|
> | NotSupported |
> | Disabled     |
> | Enabled      |

<div id="notificationsettings.previewsettings">

<div class="rst-class">

forsearch

</div>

</div>

NotificationSettings.PreviewSettings

### PreviewSettings

> The conditions under which to display previews.
>
> | Enum              |
> |-------------------|
> | Always            |
> | WhenAuthenticated |
> | Never             |

## Property descriptions

<div id="notificationsettings.alertstyle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

NotificationSettings.AlertStyle

**AlertStyle** As `AlertStyles<notificationsettings.alertstyles>`

> The various ways alerts can be displayed.
>
> This property is read-only.

<div id="notificationsettings.authorizationstatus">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

NotificationSettings.AuthorizationStatus

**AuthorizationStatus** As `AuthorizationStatuses<notificationsettings.authorizationstatuses>`

> The various status of authorization.
>
> This property is read-only.

<div id="notificationsettings.playsannouncements">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

NotificationSettings.PlaysAnnouncements

**PlaysAnnouncements** As `DeviceSettings<notificationsettings.devicesettings>`

> If `True</api/language/true>`, the app's notifications play announcements.
>
> This will cause Siri to play the notification if the user is using AirPods.
>
> This property is read-only.

<div id="notificationsettings.playssounds">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

NotificationSettings.PlaysSounds

**PlaysSounds** As `DeviceSettings<notificationsettings.devicesettings>`

> If `True</api/language/true>`, the app's notifications play sounds.
>
> This property is read-only.

<div id="notificationsettings.providesinappsettings">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

NotificationSettings.ProvidesInAppSettings

**ProvidesInAppSettings** As `Boolean</api/data_types/boolean>`

> Whether or not the OS can display a link from notification settings to the app.
>
> This property is read-only.

<div id="notificationsettings.showsalerts">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

NotificationSettings.ShowsAlerts

**ShowsAlerts** As `DeviceSettings<notificationsettings.devicesettings>`

> If `True</api/language/true>`, the app's notifications show alerts.
>
> This property is read-only.

<div id="notificationsettings.showsbadges">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

NotificationSettings.ShowsBadges

**ShowsBadges** As `DeviceSettings<notificationsettings.devicesettings>`

> If `True</api/language/true>`, the app's notifications show badges.
>
> This property is read-only.

<div id="notificationsettings.showscriticalalerts">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

NotificationSettings.ShowsCriticalAlerts

**ShowsCriticalAlerts** As `DeviceSettings<notificationsettings.devicesettings>`

> If `True</api/language/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.

<div id="notificationsettings.showsincarplay">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

NotificationSettings.ShowsInCarPlay

**ShowsInCarPlay** As `DeviceSettings<notificationsettings.devicesettings>`

> If `True</api/language/true>`, the app's notifications show alerts in CarPlay.
>
> This property is read-only.

<div id="notificationsettings.showsinnotificationcenter">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

NotificationSettings.ShowsInNotificationCenter

**ShowsInNotificationCenter** As `DeviceSettings<notificationsettings.devicesettings>`

> If `True</api/language/true>`, the app's notifications appear in the Notification Center.
>
> This property is read-only.

<div id="notificationsettings.showsonlockscreen">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

NotificationSettings.ShowsOnLockScreen

**ShowsOnLockScreen** As `DeviceSettings<notificationsettings.devicesettings>`

> If `True</api/language/true>`, the app's notifications show on the lock screen.
>
> This property is read-only.

<div id="notificationsettings.showspreviews">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

NotificationSettings.ShowsPreviews

**ShowsPreviews** As `PreviewSettings<notificationsettings.previewsettings>`

> If `True</api/language/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

|                       |        |
|-----------------------|--------|
| **Project Types**     | Mobile |
| **Operating Systems** | iOS    |
