I have this strange problem. In my app I'm asking the device, if DeviceMotion is available:
if (coreMotionManager.isDeviceMotionAvailable) {
coreMotionManager.deviceMotionUpdateInterval = 1.0 / 60.0;
[coreMotionManager startDeviceMotionUpdates];
[NSTimer scheduledTimerWithTimeInterval:1.0 / 60.0 target:self selector:@selector(didUpdateCoreMotion) userInfo:nil repeats:YES];
}
else {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"NO DEVICE MOTION" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
[alert show];
}
but it's always false... What am I doing wrong? I'm doing this on my iPad 3 and I already played around with CMMotionManager in the past and with it's .deviceMotion.attitude.roll, pitch and yaw and everything was just fine. But now I just always get alert o.O
Does anyone have an idea what can be wrong? Thx very much for any help :)
Finally restarting my Mac helped, after restart it all just worked! :) Thanks Kay for sticking around and help :)
Finally restarting my Mac helped, after restart it all just worked! :) Thanks Kay for sticking around and help :)