我有一个部署目标为 10+ 的项目,其 Realitykit 功能仅出现在 ios 13+ 设备上,问题是它在 ios 15.2 的真实设备中成功运行,但在 ios 13.4.1 中崩溃并出现错误
实例化缺少弱链接祖先的类的类元数据
@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 矩阵.usdz存在于已勾选目标会员资格的捆绑包中
我读过这个实例化缺少弱链接祖先的类的类元数据但这没有帮助
顺便说一句,如果我将部署目标提高到 ios 13,它可以很好地与任何
13+版本
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)