---
title: "didActivate(for:)"
framework: accessorynotifications
role: symbol
role_heading: Instance Method
path: "accessorynotifications/notificationsforwarding/accessorynotificationshandler/didactivate(for:)"
---

# didActivate(for:)

Establishes a notification session for communication with the system.

## Declaration

```swift
func didActivate(for session: NotificationsForwarding.Session)
```

## Parameters

- `session`: A session object that enables communication with the system.

## Discussion

Discussion Store the session reference to use across multiple notification life cycle events for sending messages to your accessory and communicating responses back to the system.

## See Also

### Managing the session life cycle

- [didInvalidate()](accessorynotifications/notificationsforwarding/accessorynotificationshandler/didinvalidate().md)
