<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.14.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UserNotifications",
  "identifier" : "/documentation/UserNotifications/UNNotificationSettings/alertSetting",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "User Notifications"
    ],
    "preciseIdentifier" : "c:objc(cs)UNNotificationSettings(py)alertSetting"
  },
  "title" : "alertSetting"
}
-->

# alertSetting

The authorization status for displaying alerts.

```
var alertSetting: UNNotificationSetting { get }
```

## Discussion

When the value of this property is [`UNNotificationSetting.enabled`](/documentation/UserNotifications/UNNotificationSetting/enabled), the app is authorized to display alerts. Authorization does not guarantee that alerts always appear on the user’s screen. When a device is unlocked, the [`alertStyle`](/documentation/UserNotifications/UNNotificationSettings/alertStyle) property determines the presentation style for the alert, which can include not displaying the alert at all.

The system tries to display an alert when the [`title`](/documentation/UserNotifications/UNNotificationContent/title), [`subtitle`](/documentation/UserNotifications/UNNotificationContent/subtitle), or [`body`](/documentation/UserNotifications/UNNotificationContent/body) properties of a [`UNNotificationContent`](/documentation/UserNotifications/UNNotificationContent) object contain values, or when the `aps` dictionary in a remote notification contains the `alert` key.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)