<!--
{
  "availability" : [
    "macOS: 27.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SpatialPreview",
  "identifier" : "/documentation/SpatialPreview/USDPreviewSession",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Spatial Preview",
      "USDKit"
    ],
    "preciseIdentifier" : "s:22_SpatialPreview_USDKit17USDPreviewSessionC"
  },
  "title" : "USDPreviewSession"
}
-->

# USDPreviewSession

A session that enables you to present the contents of a Universal Scene Description (USD) stage.

```
final class USDPreviewSession
```

## Overview

To create a `USDPreviewSession`, initialize one with a <doc://com.apple.documentation/documentation/USDKit/USDStage> from <doc://com.apple.documentation/documentation/USDKit>:

```swift
let observer = ConnectedSpatialEndpointObserver()

let session = USDPreviewSession(stage: usdStage)

// Wait for a device to become available.
let endpoint = try await observer.endpoint

try await session.start(endpoint: endpoint)
```

After [`start(endpoint:parameters:viewerOptions:)`](/documentation/SpatialPreview/USDPreviewSession/start(endpoint:parameters:viewerOptions:)) returns, the session’s `state` transitions to [`SpatialPreviewSessionState.connected`](/documentation/SpatialPreview/SpatialPreviewSessionState/connected) and the device starts loading the USD content. Then use <doc://com.apple.documentation/documentation/USDKit> to make edits to the <doc://com.apple.documentation/documentation/USDKit/USDStage> to update the content. Changes on visionOS are automatically synchronized back to <doc://com.apple.documentation/documentation/USDKit> in your macOS app.

---

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)