I got:
[Session] Session (0x10495f5b0): did fail with error: Error Domain=com.apple.arkit.error Code=102
And so I tried to intercepts and handle it with
class SceneLocationViewDelegate: ARSCNVDelegate{
func session(_ session: ARSession, didFailWithError error: Error) {
// Present an error message to the user
print("Session failed. Changing worldAlignment property.")
print(error.localizedDescription)
if let arError = error as? ARError {
switch arError.errorCode {
case 102:
configuration.worldAlignment = .gravity
restartSessionWithoutDelete()
default:
restartSessionWithoutDelete()
}
}
}
}
But I get several errors on most keywords: what is wrong and how do I hande that error anyway?