<!--
{
  "availability" : [
    "iOS: 26.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AccessoryNotifications",
  "identifier" : "/documentation/AccessoryNotifications/NotificationsForwarding/AccessoryNotificationsHandler",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Accessory Notifications"
    ],
    "preciseIdentifier" : "s:22AccessoryNotifications0B10ForwardingC0aB7HandlerP"
  },
  "title" : "NotificationsForwarding.AccessoryNotificationsHandler"
}
-->

# NotificationsForwarding.AccessoryNotificationsHandler

A protocol that defines methods for handling notification life cycle events in your extension.

```
protocol AccessoryNotificationsHandler : Sendable
```

## Overview

Implement this protocol in your app’s [`didActivate(for:)`](/documentation/AccessoryNotifications/NotificationsForwarding/AccessoryNotificationsHandler/didActivate(for:)) extension to receive, update, and remove notifications forwarded to your accessory.

## Topics

### Managing the session life cycle

[`func didActivate(for: NotificationsForwarding.Session)`](/documentation/AccessoryNotifications/NotificationsForwarding/AccessoryNotificationsHandler/didActivate(for:))

Establishes a notification session for communication with the system.

[`func didInvalidate()`](/documentation/AccessoryNotifications/NotificationsForwarding/AccessoryNotificationsHandler/didInvalidate())

Handles notification session termination.

### Receiving notifications

[`func addNotification(AccessoryNotification, alertingContext: AlertingContext) async throws -> Bool`](/documentation/AccessoryNotifications/NotificationsForwarding/AccessoryNotificationsHandler/addNotification(_:alertingContext:))

Provides a new notification for display on your accessory.

### Updating notifications

[`func updateNotification(AccessoryNotification)`](/documentation/AccessoryNotifications/NotificationsForwarding/AccessoryNotificationsHandler/updateNotification(_:))

Updates a notification with new content.

### Removing notifications

[`func removeNotification(identifier: AccessoryNotification.Identifier)`](/documentation/AccessoryNotifications/NotificationsForwarding/AccessoryNotificationsHandler/removeNotification(identifier:))

Removes a previously-posted notification from your accessory.

[`func removeAllNotifications()`](/documentation/AccessoryNotifications/NotificationsForwarding/AccessoryNotificationsHandler/removeAllNotifications())

Removes all notifications from the user interface.

### Receiving accessory messages

[`func messageHandler(TransportMessage)`](/documentation/AccessoryNotifications/NotificationsForwarding/AccessoryNotificationsHandler/messageHandler(_:))

Handles decrypted messages received from the paired accessory.

## Relationships

### Inherits From

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

---

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)