I start device motion updates in the foreground. When I put the app to background by locking the phone, I continue to get updates but when I unlock my phone, device motion stops updating. Accelerometer,gyroscope and location updates are working fine both in background and when I bring it back to foreground.
I am using CMMotionManager for getting accelerometer,gyroscope and device motion. I am reading the pitch, roll and yaw values from Device Motion.