Openframeworks/ios addon (tested with OF 0.9.0, Xcode 7.1, ios 9.1) for the Core Motion Framework- http://developer.apple.com/library/ios/#documentation/CoreMotion/Reference/CoreMotion_Reference/_index.html
Example displays the values for attitude (quaternion & roll/pitch/yaw euler angles), gyroscope, accelerometer, & magentometer. The cube moves based on the attitude quaternion.
Can be used in replacement of ofxAccelerometer (which uses the deprecated UIAccelerometer).
Add the 'CoreMotion.framework' to your OF xcode project.
- Under TARGETS > ofxCoreMotionExample, under the 'Build Phases' tab, where it says 'Link binary with libraries', click '+' and select the 'CoreMotion.framework'.
Original DeviceMotion/attitude example by Nardove found on the Openframeworks forum: http://forum.openframeworks.cc/index.php/topic,11517.0.html - Thanks!
See example project for usage.
-Trent Brooks