---
title: "sendDataToAudioExtension(_:)"
framework: AudioAccessoryKit
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+]
path: "audioaccessorykit/audioaccessoryheadtracking/session/senddatatoaudioextension(_:)"
---

# sendDataToAudioExtension(_:)

Forward a frame of IMU sensor data from the accessory to the Spatial Audio renderer.

## Declaration

```swift
final func sendDataToAudioExtension(_ data: Data) throws
```

## Parameters

- `data`: The raw sensor frame as received from the accessory. Must be 1–70 bytes; otherwise AudioAccessoryError.invalidDataSize is thrown.

## Discussion

Discussion note: AudioAccessoryError.invalidDataSize if data is empty or larger than 70 bytes; AudioAccessoryError.notActivated if the session is not currently active.
