Can someone explain the difference between
An instance of the CMAccelerometerData class represents an accelerometer event. It is a measurement of acceleration along the three spatial axes at a moment of time.
An instance of CMDeviceMotion encapsulates measurements of the attitude, rotation rate, and acceleration of a device.
The difference is that
CMDeviceMotion incorporates the gyroscope, accelerometer and compass data where
CMAccelerometerData only contains the raw accelerometer data.