CoreMotion should work with apportable. Here is a simplified initialization and usage paradigm that I've tested on a Nexus 7 (2012).
self.motionManager = [[CMMotionManager alloc] init];
[self.motionManager startDeviceMotionUpdates];
self.motionTimer = [NSTimer scheduledTimerWithTimeInterval:0.2
target:self
selector:@selector(handleDeviceMotion)
userInfo:nil
repeats:YES];
Instead of using startDeviceMotionUpdatesToQueue: withHandler:
to process the motion events, try explicitly accessing the deviceMotion
property in a handleDeviceMotion
method which will be called by the repeating timer.
-(void) handleDeviceMotion {
CMDeviceMotion *motion = [self.motionManager deviceMotion];
// use motion data accordingly
}
And don't forget to stop updates when you're done!
[self.motionManager stopDeviceMotionUpdates];