---
title: AccessorySensorUpdates
framework: AudioAccessoryKit
role: symbol
role_heading: Structure
platforms: [iOS 27.0+]
path: audioaccessorykit/accessorysensorupdates
---

# AccessorySensorUpdates

Subscribes to a stream of raw sensor data packets from a connected accessory.

## Declaration

```swift
struct AccessorySensorUpdates
```

## Overview

Overview An Audio Rendering Extension launched by AudioToolbox uses this type to receive sensor data from a 3P accessory that has registered .headTracking via AccessoryControlDevice. Data is brokered through audioaccessoryd over XPC. No XPC resources are acquired until iteration begins. Cancel the owning Task to stop receiving updates and release the connection. Usage guard AccessorySensorUpdates.isSupported else { return } let updates = AccessorySensorUpdates(for: accessoryIdentifier) sensorTask = Task { [weak self] in     do {         for try await data in updates {             self?.processSensorData(data)         }     } catch AccessorySensorUpdates.StreamError.connectionLost {         // Terminal; stream is over     } }

## Topics

### Initializers

- [init(for:)](audioaccessorykit/accessorysensorupdates/init(for:).md)

### Type Properties

- [isSupported](audioaccessorykit/accessorysensorupdates/issupported.md)

### Enumerations

- [AccessorySensorUpdates.StreamError](audioaccessorykit/accessorysensorupdates/streamerror.md)

## Relationships

### Conforms To

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