1

Working with Apple Vision Pro SDK. When trying to reference ARView in ARKit I get ARView is unavailable in xrOS. But the docs for ARView say it's available in visionOS 1.0+ Beta.

Andy Jazz
  • 49,178
  • 17
  • 136
  • 220
NSCaleb
  • 135
  • 4

1 Answers1

2

This is definitely a bug in the Apple documentation. ARView for SwiftUI is a view working with UIKit's wrapper (UIViewRepresentable) and AppKit's wrapper (NSViewRepresentable). Loading ARView in visionOS causes an error (Xcode 15 beta 3). This seems quite logical to me, because the scene's assembly point in visionOS is no longer arView.scene, but make / update closure's content parameter (RealityViewContent).

enter image description here

In visionOS, RealityView and Model3D view are used instead.

Andy Jazz
  • 49,178
  • 17
  • 136
  • 220