In order to use deviceMotion.attitude
you have to call [motionManager startDeviceMotionUpdates]
.
startAccelerometerUpdates
provides accelerometer data only like startGyroUpdates
will give you gyroData
. Note that device motion data is more than just accelerometer and gyro data as both of them will be combined (sensor fusion) to achieve more precision.