PhotogrammetrySession completes request but does not create file


Make sure that you selected the folder using NSOpenPanel, added a filename of type usdz and that the File Access permissions for User Selected File are set to "Read/Write."
The following tutorial reveals elements from our upcoming app Object Capture Pro. If you wish to be updated on the progress and release of this app, please subscribe using the link below.
To learn how to access a folder using NSOpenPanel, consult the tutorial below.
Once you have the output location, make sure that the url for the model file is similar to:
let url = outputLocation.appendingPathComponent("MODEL_NAME").appendingPathExtension("usdz")
With a corresponding photogrammetry request similar to:
PhotogrammetrySession.Request.modelFile(url: url, detail: .reduced)

Finally, within the app target, make sure that the File Access for User Selected Files is set to Read/Write.
Looking to learn more about SwiftUI, Swift, RealityKit, Design and Technology?
Search our blog to learn more about Swift, SwiftUI, RealityKit, design and technology.