---
title: "init(sessionID:data:)"
framework: accessorytransportextension
role: symbol
role_heading: Initializer
path: "accessorytransportextension/transportmessage/init(sessionid:data:)"
---

# init(sessionID:data:)

Initializes a transport message for a specific capability session.

## Declaration

```swift
init(sessionID: UUID, data: Data)
```

## Parameters

- `sessionID`: A unique identifier for the session capability (such as notifications or Live Activities). The system generates this identifier at feature enrollment time, and the value is fixed while the accessory remains paired through AccessorySetupKit.
- `data`: The message data to send.

## Discussion

Discussion Create transport messages when your accessory sends data back to the data provider through sendMessageToDataProvider(_:).
