<!--
{
  "availability" : [
    "iOS: 26.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AccessoryNotifications",
  "identifier" : "/documentation/AccessoryNotifications/NotificationsForwarding/AccessoryNotificationsHandler/addNotification(_:alertingContext:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Accessory Notifications"
    ],
    "preciseIdentifier" : "s:22AccessoryNotifications0B10ForwardingC0aB7HandlerP15addNotification_15alertingContextSbAA0aF0V_AA08AlertingH0VtYaKF"
  },
  "title" : "addNotification(_:alertingContext:)"
}
-->

# addNotification(_:alertingContext:)

Provides a new notification for display on your accessory.

```
func addNotification(_ notification: AccessoryNotification, alertingContext: AlertingContext) async throws -> Bool
```

## Parameters

`notification`

The notification to add.

`alertingContext`

Context for evaluating whether the notification can alert or be delivered quietly.

## Return Value

`true` if the accessory alerted for the notification, `false` otherwise. If this method throws an error, the system assumes the accessory did not alert.

## Discussion

Parse the notification details, select the information to display on your accessory, and convert it to data for transmission. Return `true` if your accessory successfully alerts 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)