Apologies for the newb question in advance (can't find it elsewhere on SO), but has anyone had problems in getting any and/or all the ARKit demos to initialize?
Take for example, the default / vanilla app - what you get when you create an empty ARKit project. What I see is the ship hovering above the default view port, and when I pan, it stays pretty much centered in the viewport and not fixed in space, I cannot move above or to the sides of the spaceship. When I look at the camera state property in cameraDidChangeTrackingState, it shows "limited / initializing, but never changes from that. I feel like I must be missing something obvious, like perhaps an entitlement - or some other device level setting?
func session(_ session: ARSession, cameraDidChangeTrackingState camera: ARCamera) {
switch camera.trackingState {
case .notAvailable:
print("Tracking: not available: \(camera.trackingState)")
case .limited(let reason):
print("Tracking limited: \(reason)") <-- only gets here, with "initializing"
case .normal:
print("tracking normal: \(camera.trackingState)")
}
}
For what it's worth, I am using Xcode 9.0, and an iPhone 8.
Thanks!
As odd as it seemed, simply restarting the phone fixed the problems on all the apps that I was seeing. I have no idea what went wrong or why though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With