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."

Oscar de la Hera Gomez
Written by Oscar de la Hera Gomez
First published on 11/21/2024 at 18:23
Last Updated on 11/21/2024 at 18:42
<p>Three flowers that represent SwiftUI, RealityKit and XCode side by side. Beneath them sits the text "PhotogrammetrySession completes request but does not create file."</p>

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."

SubscribeDownload open source SwiftUI starter project

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.

Subscribe

To learn how to access a folder using NSOpenPanel, consult the tutorial below.

How to get the URL for a folder or files in Swift

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)
<p>A screenshot of XCode showing we have set the File Access for User Selected Files to Read/Write within the target for our macOS app.</p>

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.

Search our Blog

Any Questions?

We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.
SubscribeContact UsVisit our BlogView our ServicesView our Work

Partner with us

We would love to get to know you and see how we can help your organization with its goals and needs.
Let's Talk

Stay Informed

Get occasional updates about our company, research, and product launches.
Subscribe