Loading Entities from a File

I created a .reality file which i exported from Reality Composer and added to the project.

The code:
Code Block
class ViewController: UIViewController {
@IBOutlet var arView: ARView!
override func viewDidLoad() {
super.viewDidLoad()
if let anchor = try? Entity.loadAnchor(named: "ARAnchorTestFile") {
arView.scene.addAnchor(anchor)
}
}
}

On devices with iOS version 13.5 or higher the app crash when the anchoring is triggered and the 3D model should be displayed.

The error:
Thread 1: EXCBADACCESS (code=1, address=0x40)

The entire project has been uploaded to this
repo: https://github.com/evjand/ARAnchorTest
On iOS/iPadOS 14 (currently still in beta), your project launched and complied without issue for me. I was able to detect a surface and the AR box appeared as expected. While I recognize that may not be an overly helpful explanation to the issue you are facing, I certainly encourage you to try cleaning your build folder (within Xcode, Product -> Clean Build Folder) and try testing again, as well as ensuring your iPhone/iPad software (and Xcode software) are fully up to date. Just offering some confidence that your code does work, and did run successfully, on my end.
Loading Entities from a File
 
 
Q