<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/RemoteDeviceIdentifier",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI22RemoteDeviceIdentifierV"
  },
  "title" : "RemoteDeviceIdentifier"
}
-->

# RemoteDeviceIdentifier

An opaque type that identifies a remote device displaying scene content
in a [`RemoteImmersiveSpace`](/documentation/SwiftUI/RemoteImmersiveSpace).

```
struct RemoteDeviceIdentifier
```

## Overview

Access this from the [`remoteDeviceIdentifier`](/documentation/SwiftUI/EnvironmentValues/remoteDeviceIdentifier)
environment property in a remote scene to get the identifier for that
scene’s device.

When accessed in a context that is being presented on the local device,
this value will be `nil`.

This identifier can also be used to initialize an `ARKitSession`
associated with the remote device.

```
struct SolarSystem: CompositorContent {
    @Environment(\.remoteDeviceIdentifier) private var deviceID

    var body: some CompositorContent {
        RemoteImmersiveSpace {
            CompositorLayer { layerRenderer in
                // Create an ARSession for the device
                let arSession = ARKitSession(deviceID)

                // Set up and run the Metal render loop.
                let renderThread = Thread {
                    let engine = solar_engine_create(
                        layerRenderer, arSession)
                    solar_engine_render_loop(engine)
                }
                renderThread.name = "Render Thread"
                renderThread.start()
            }
        }
    }
}
```

> Note: This identifier is not stable across app launches.

## Topics

### Instance Properties

[`var cDevice: ar_device_t`](/documentation/SwiftUI/RemoteDeviceIdentifier/cDevice)

Returns the `ar_device` associated with this device.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)