I’m trying to export a usdz file as an stl using model.io, as outlined in this answer: Can I convert a USDZ to solid mesh such as stl
My app seems to run just fine and I can download the .usdz
file that I generate without issue. However, when I try to convert it to an .stl
file, Xcode displays a red error message saying:
Received port for identifier response: <(null)> with error:
Error Domain=RBSServiceErrorDomain
Code=1 "Client not entitled"
UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false}
And here is the code that should be doing the conversion:
let destinationFolderURL = FileManager.default.temporaryDirectory.appending(path: "Export")
let destinationURL = destinationFolderURL.appending(path: "Room.usdz")
let capturedRoomURL = destinationFolderURL.appending(path: "Room.json")
let newUsdz = URL(fileURLWithPath: "Room.usdz")
let asset = MDLAsset(url: newUsdz);
let stl = destinationFolderURL.appending(path: "Room.stl")
do {
try FileManager.default.createDirectory(at: destinationFolderURL, withIntermediateDirectories: true)
try asset.export(to: stl)
} catch {
print("Error = (error)")
}
Not sure what I should do. When I search for the error, I see a StackOverflow answer that suggests it is a either a UI issue or a plain glitch, which doesn’t make since to me since the code worked perfectly until I added the .stl
conversion from Model IO.
Other online resources have suggested adding “Capabilities” under Xcode, but I am unsure how to figure out which capabilities might be required.
2