the main idea of an app i'm working on it is: if the user picked up and put down his iPhone even if it's locked; or interact with it(i.e press the home button, volume button, power button), i should inform the app to do something. the big problem that faced me is the sensors don't work in the background, and i saw a problem like mine here with no answer: iOS 7.1: Get Core Motion data (accelerometer, gyroscope) while app is in background
so please anyone can help me with this mission? any example ? I'd be thankful for any help.