I have project with deployment target 10+ with a realitykit feature that only appears on ios 13+ devices , the problem is it runs successfully in real device with ios 15.2 but crashes in ios 13.4.1 with error
Instantiating class metadata for class with missing weak-linked ancestor
@available(iOS 13.0, macOS 10.15, *)
class MyVC: UIViewController, ARCoachingOverlayViewDelegate {
func addModel() {
let path = Bundle.main.path(forResource: "Matrix", ofType: "usdz")!
let url = URL(fileURLWithPath: path)
let assetsLoader = try Entity.load(contentsOf: url)// crashes here
let anchor = AnchorEntity(plane: .horizontal)
anchor.addChild(assetsLoader)
arView.scene.anchors.removeAll()
arView.scene.addAnchor(anchor)
.....
}
....
}
// instantiating class metadata for class with missing weak-linked ancestor(lldb)
Where Matrix.usdz exists in bundle with target membership ticked
I have read this Instantiating class metadata for class with missing weak-linked ancestor but it doesn't help
BTW if i raised deployment target to ios 13 it works well with any 13+ version