Posts

Post not yet marked as solved
1 Replies
619 Views
I am working on developing an AR app that will detect different networking devices used by my company. This app will be distributed among our company and potentially to our customers. I have created a working app that detects reference objects loaded into the assets catalog of xcode. What I am trying to do now is be able to load additional reference objects from local storage on a phone when new devices are scanned. I am trying to load from the url path to the folder I am saving all the new scans on but xcode keeps giving me an error message saying it cannot read the url path.Here is the code I am trying to run:let configuration = ARWorldTrackingConfiguration()configuration.detectionObjects = ARReferenceObject.referenceObjects(inGroupNamed: "Devices", bundle: Bundle.main)! let urlPath = "/private/var/mobile/Containers/Data/Application/"let completeURL = URL(fileURLWithPath: urlPath) do { let newReferenceObject = try ARReferenceObject(archiveURL: completeURL) configuration.detectionObjects.insert(newReferenceObject)} catch { fatalError("Failed to create reference object from archiveURL.")} sceneView.session.run(configuration)And this is the error message I keep getting:2020-02-19 13:08:02.112476-0700 icfgar[11769:2529945] [General] Unable to read archive at path: /private/var/mobile/Containers/Data/Application.Fatal error: Failed to create reference object from archiveURL.: file /Users/taylorjohnson/Desktop/icfgar/icfgar/ViewController.swift, line 73Any help would be appreciated.
Posted Last updated
.