---
title: AccessoryFeatureSessionHandler
framework: Accessory Transport Extension
role: symbol
role_heading: Protocol
platforms: [iOS 27.3+]
path: accessorytransportextension/accessoryfeaturesessionhandler
---

# AccessoryFeatureSessionHandler

A protocol that receives events from a data provider extension’s feature session.

## Declaration

```swift
protocol AccessoryFeatureSessionHandler<Session> : Sendable
```

## Overview

Overview Conform to this protocol in your data provider extension to respond to the AccessoryFeatureSession life cycle and incoming data. The system creates an instance of your type from the handler factory closure you provide when you declare the feature. Pass the closure to init(_:) once for each session that starts. A handler that serves one feature can’t serve another because each feature pins the Session associated type through its own Handler type alias (for example, AccessoryWorker.Handler). Implement sessionStarted(_:) to hold the session weakly, and implement dataReceived(_:) to process data that the transport extension sends.

## Topics

### Handling the session life cycle

- [sessionStarted(_:)](accessorytransportextension/accessoryfeaturesessionhandler/sessionstarted(_:).md)
- [sessionInvalidated(error:)](accessorytransportextension/accessoryfeaturesessionhandler/sessioninvalidated(error:).md)

### Receiving data

- [dataReceived(_:)](accessorytransportextension/accessoryfeaturesessionhandler/datareceived(_:).md)

### Associated Types

- [Session](accessorytransportextension/accessoryfeaturesessionhandler/session.md)

## Relationships

### Inherits From

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Managing feature sessions

- [AccessoryFeatureSession](accessorytransportextension/accessoryfeaturesession.md)
- [AccessoryFeatureRuntimeSession](accessorytransportextension/accessoryfeatureruntimesession.md)
- [AccessoryFeatureRuntimeSessionHandler](accessorytransportextension/accessoryfeatureruntimesessionhandler.md)
