Cannot find 'PhotogrammetrySession' in scope

Hi, I'm using the sample code from https://developer.apple.com/documentation/realitykit/creating_3d_objects_from_photographs

I copied it in Playground of Xcode 13 beta, added an import of RealityKit, and RealityFoundation, but I'm getting this error Cannot find 'PhotogrammetrySession' in scope

I tried in a project created in Xcode 13 but I'm getting the same error.

I know how dumb this may seem, but what I'm missing here? I'm on macOS 11.4 and Xcode 13.0 beta (13A5154h)

Answered by Graphics and Games Engineer in 678795022

Hi, you do not need to import RealityFoundation, just RealityKit. Also, the issue may be caused because you are running on macOS 11.4. The PhotogrammetrySession is only supported on macOS 12.

Accepted Answer

Hi, you do not need to import RealityFoundation, just RealityKit. Also, the issue may be caused because you are running on macOS 11.4. The PhotogrammetrySession is only supported on macOS 12.

I see, I thought it'd run normally as part of Xcode 13, but I guess I missed the macOS 12 requirement.

Thanks for the reply.

I'm trying to build Creating a Photogrammetry Command-Line App, getting the same error on my macOS 12 beta (21A5534d) and Xcode 13.0 (12A233). What can I do now?

BTW there's a warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 12.0, but the range of supported deployment target versions is 10.9 to 11.3.99. My default target is indeed 12.0 by default, so this warning seems weird. Is it related to the error in question?

Cannot find 'PhotogrammetrySession' in scope
 
 
Q