Diorama Demo Issues -

I'm trying to run this demo, which opened a month ago, but now returns 2 issues in xCode: https://developer.apple.com/documentation/visionos/diorama

My goal is to better understand how to use Reality Composer Pro to develop visionOS apps for the Vision Pro.

BillboardSystem.swift:39:58 Value of type 'WorldTrackingProvider' has no member 'queryDeviceAnchor'

Cannot find 'Attachment' in scope. Preview paused shows.

Any thoughts on where I'm off? Thanks!

Hello!

This API was renamed to "queryDeviceAnchor": https://developer.apple.com/documentation/arkit/worldtrackingprovider/4293525-querydeviceanchor?changes=late__8_8

So, the following would be the replacement for the code that isn't compiling:

worldTrackingProvider.queryDeviceAnchor(atTimestamp: CACurrentMediaTime())

Also

let cameraTransform = Transform(matrix: pose.originFromDeviceTransform)

needs to become

let cameraTransform = Transform(matrix: pose.originFromAnchorTransform)

Attachments work differently now, as well, so that for example

    } attachments: {
        Text("Preview")
            .font(.system(size: 100))
            .background(.pink)
            .tag("previewTag")
    }

needs to become

    } attachments: {
		Attachment(id: "previewTag") {
			Text("Preview")
				.font(.system(size: 100))
				.background(.pink)
		}
    }
Diorama Demo Issues -
 
 
Q