With the M7 chip in the latest iOS devices one can get programmatically notified as the user goes from stationary to running, walking, etc using CMMotionActivityManager. Sta
First, check if you have set up the background behave of your app.
Go to target - capabilities section and check Background mode for location updates.