SceneKit - error Thread 1: "*** -[NSPathStore2 stringByAppendingPathExtension:]: nil argument

We are trying to save scene into usdz by using scene?.write method , which seems to work as expected until iOS 17.

in iOS 17 we are getting error Thread 1: "*** -[NSPathStore2 stringByAppendingPathExtension:]: nil argument which seems to be because of scenekit issue attaching StackTrace screenshot for reference

we have used updated method for url in scene?.write(to : url, delegate:nil) where url has been generated using .appending(path: String) method

I have the exact same problem with iOS 17, it seems that changing the file ending to ".scn" will export the fully intact scene but I could not find a way to do the same with usdz

I am still running into this error on visionOS (using Xcode 15 beta 3), with both .usdz and .scn files.

SceneKit - error Thread 1: "*** -[NSPathStore2 stringByAppendingPathExtension:]: nil argument
 
 
Q