Im working on a AR app for my company, and it is working smoothly, except on around one out of ten devices. (all iphone 4 and 4s, 5.1.1+)
When we run this code :
CMDeviceMotion *d = motionManager.deviceMotion;
if (d == nil && motionManager.deviceMotionActive && motionManager != nil) {
DLog(@"Device motion is active, but no device motion recieved");
}
We get a solid block of "Device motion is active, but no device motion recieved" on some of the devices, but it seems utterly random.
If motionManager.deviceMotionActive
is true, and the motion manager exists, the .deviceMotion should return a CMDeviceMotion. But it just returns nil.
Does anyone have an idea what could cause this ? The check is being run in my
- (void)onDisplayLink:(id)sender
After some roaming about, we discovered that this was due to a infrequent hardware/firmware error. The wisest thing was to check for both motionManager.deviceMotion being Nil, and the motionManager.deviceMotionActive being true.
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