<!--
{
  "availability" : [
    "iOS: 26.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AccessoryNotifications",
  "identifier" : "/documentation/AccessoryNotifications/AlertingContext/init(notificationCanAlert:suppressedByFocus:kind:sound:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Accessory Notifications"
    ],
    "preciseIdentifier" : "s:22AccessoryNotifications15AlertingContextV20notificationCanAlert17suppressedByFocus4kind5soundACSb_SbAC4KindOAC5SoundVSgtcfc"
  },
  "title" : "init(notificationCanAlert:suppressedByFocus:kind:sound:)"
}
-->

# init(notificationCanAlert:suppressedByFocus:kind:sound:)

Initializes an alerting context with notification alert conditions.

```
init(notificationCanAlert: Bool = false, suppressedByFocus: Bool = false, kind: AlertingContext.Kind = .notification, sound: AlertingContext.Sound? = nil)
```

## Parameters

`notificationCanAlert`

A Boolean value that indicates whether the notification can alert.

`suppressedByFocus`

A Boolean value that indicates whether Focus suppresses the alert.

`kind`

The classification for the notification type.

`sound`

An optional sound configuration for the notification.

---

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)