<!--
{
  "availability" : [
    "macOS: 27.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SpatialPreview",
  "identifier" : "/documentation/SpatialPreview/ConnectedSpatialEndpointObserver/endpoint",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Spatial Preview"
    ],
    "preciseIdentifier" : "s:14SpatialPreview09ConnectedA16EndpointObserverC8endpointAA0abD0Vvp"
  },
  "title" : "endpoint"
}
-->

# endpoint

The endpoint for the visionOS device currently connected via Mac Virtual Display.

```
@MainActor final var endpoint: SpatialPreviewEndpoint { get async throws }
```

## Discussion

Check [`isEndpointAvailable`](/documentation/SpatialPreview/ConnectedSpatialEndpointObserver/isEndpointAvailable) before accessing this property to avoid
catching an [`ConnectedSpatialEndpointObserver.UnavailableError`](/documentation/SpatialPreview/ConnectedSpatialEndpointObserver/UnavailableError).

> Throws: ``doc://com.apple.SpatialPreview/documentation/SpatialPreview/ConnectedSpatialEndpointObserver/UnavailableError`` if no device is currently connected via
> Mac Virtual Display.

---

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)