I’ve seen, that when I attempt to create a AR venture on IOS with Xcode, even that if I exploit default settings and default venture – I obtain this type of the “Deadly Error“:
//
// ViewController.swift
// check
//
//
import UIKit
import SceneKit
import ARKit
class ViewController: UIViewController, ARSCNViewDelegate {
@IBOutlet var sceneView: ARSCNView!
override func viewDidLoad() {
tremendous.viewDidLoad()
// Set the view's delegate
sceneView.delegate = self
// Present statistics similar to fps and timing data
sceneView.showsStatistics = true
// Create a brand new scene
let scene = SCNScene(named: "artwork.scnassets/ship.scn")!
// Set the scene to the view
sceneView.scene = scene
}
override func viewWillAppear(_ animated: Bool) {
tremendous.viewWillAppear(animated)
// Create a session configuration
let configuration = ARWorldTrackingConfiguration()
// Run the view's session
sceneView.session.run(configuration)
}
override func viewWillDisappear(_ animated: Bool) {
tremendous.viewWillDisappear(animated)
// Pause the view's session
sceneView.session.pause()
}
// MARK: - ARSCNViewDelegate
/*
// Override to create and configure nodes for anchors added to the view's session.
func renderer(_ renderer: SCNSceneRenderer, nodeFor anchor: ARAnchor) -> SCNNode? {
let node = SCNNode()
return node
}
*/
func session(_ session: ARSession, didFailWithError error: Error) {
// Current an error message to the person
}
func sessionWasInterrupted(_ session: ARSession) {
// Inform the person that the session has been interrupted, for instance, by presenting an overlay
}
func sessionInterruptionEnded(_ session: ARSession) {
// Reset monitoring and/or take away present anchors if constant monitoring is required
}
}
As quickly as I lunch the app, I get this error in debug:
2023-04-16 02:12:05.471666+0300 check[13308:8472291] [SceneConfiguration] Data.plist contained no UIScene configuration dictionary (in search of configuration named "(no identify)")
2023-04-16 02:12:05.471706+0300 check[13308:8472291] [SceneConfiguration] Data.plist contained no UIScene configuration dictionary (in search of configuration named "(no identify)")
2023-04-16 02:12:05.475942+0300 check[13308:8472291] Steel GPU Body Seize Enabled
2023-04-16 02:12:05.476043+0300 check[13308:8472291] Steel API Validation Enabled
check/ViewController.swift:26: Deadly error: Unexpectedly discovered nil whereas unwrapping an Non-obligatory worth
2023-04-16 02:12:05.549337+0300 check[13308:8472291] check/ViewController.swift:26: Deadly error: Unexpectedly discovered nil whereas unwrapping an Non-obligatory worth
(lldb)
However I’m 100% certain, that the file is within the folder artwork.scnassets and path identify is appropriate.