---
title: TransportMessage
framework: accessorytransportextension
role: symbol
role_heading: Structure
path: accessorytransportextension/transportmessage
---

# TransportMessage

A structure that represents a message for transmission between the system and an accessory.

## Declaration

```swift
struct TransportMessage
```

## Overview

Overview The AccessoryTransportSession.EventHandler protocol’s messageReceived(_:completion:) method receives messages of this type from the system. Use the sendMessageToDataProvider(_:) method to send messages from your accessory back to the data provider extension. Correlate messages with capabilities The sessionID property identifies the capability session to which the message belongs. The system generates this identifier at feature enrollment time, and the value is fixed while the accessory remains paired through AccessorySetupKit.

## Topics

### Creating a transport message

- [init(sessionID:data:)](accessorytransportextension/transportmessage/init(sessionid:data:).md)

### Accessing message content

- [data](accessorytransportextension/transportmessage/data.md)
- [sessionID](accessorytransportextension/transportmessage/sessionid.md)

## Relationships

### Conforms To

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

## See Also

### Data and sessions

- [AccessoryFeature](accessorytransportextension/accessoryfeature.md)
- [AccessoryMessage](accessorytransportextension/accessorymessage.md)
- [AccessorySecuritySession](accessorytransportextension/accessorysecuritysession.md)
- [SecurityMessage](accessorytransportextension/securitymessage.md)
- [AccessoryTransport](accessorytransportextension/accessorytransport.md)
