Xcode Preview visionOS Volume Window

Anyone else having issues in Xcode preview where when you tap on a button to open a volume window nothing appears in the Xcode preview window?

For example, if you download the Hello World Xcode project and try to open the globe volume after tapping the toggle button, the globe volume window never opens.

Running the latest version of Xcode 15.3 beta.

Hi,

Sorry to hear you are having problems. Opening separate windows inside previews is not currently supported; for that you'll have to build+run in the simulator/on device.

As for previewing windows as volumetric instead of a normal one you'd want to use: https://developer.apple.com/documentation/swiftui/preview(_:windowstyle:traits:body:)

Hope that helps!

Thanks! I'll run the simulator and see how that goes. Is the above preview code necessary for viewing the volume window in the simulator or on device?

Oh! I Also noticed in Xcode that some windows do not have the grey glass texture to them. Is this an Xcode issue or a problem with my preview code? Thanks! #Preview { if let safeLoad = ecommdata { BrandImage(brand: safeLoad) } else { Text("Unable to load 3D Asset") } }

Xcode Preview visionOS Volume Window
 
 
Q