---
title: "init(device:)"
framework: realitykit
role: symbol
role_heading: Initializer
path: "realitykit/anchoringcomponent/accessoryanchoringsource/init(device:)"
---

# init(device:)

Creates the accessory anchoring source by the GCDevice asynchronously Returns an AccessoryAnchoringSource if the GCDevice supports spatial tracking, throwing an error otherwise

## Declaration

```swift
init(device: any GCDevice) async throws
```

## Parameters

- `device`: Device to track
