For future reference, I think the correct way can be wound in this example project by Apple: https://developer.apple.com/documentation/realitykit/taking_pictures_for_3d_object_capture
let depthData = photo.depthData?.converting(toDepthDataType: kCVPixelFormatType_DisparityFloat32)
This can be used with kCVPixelFormatType_DisparityFloat16 / kCVPixelFormatType_DisparityFloat32 / kCVPixelFormatType_DepthFloat16 / kCVPixelFormatType_DepthFloat32