Am developing application for calculate count of user moved steps and draw the user activities in the map. And we are using UIAccelerometer delegate for receive acceleration-related data from the onboard hardware. So I need to receive acceleration-related data when the application in background mode too. Last time one of my application got rejected because of using location service in background, Apple suggested me like "you can only use this background mode if your app truly needs this information to provide value for the user". Kindly suggest the best approach for this application.
2 Answers
This can easily be done.
What happens in that iOS put your application in halt state when your application is not in running in foreground state.
You just need to register your application for background execution.
Refer : http://dcraziee.wordpress.com/2013/05/20/background_ios/
Also refer : iOS background application network access for apple policies about using location service.Which states that you can use location service in background.

- 1
- 1

- 178
- 7
-
since the app was rejected for running tasks in background, i guess the OP knows how to do this already... – Swapnil Luktuke May 20 '13 at 12:16
You cannot run accelerometer in background. You can track user's location in background... however, if you just keep tracking it and do nothing with that info.. apple is going to reject it and tell you to just get the lates location when app comes to foreground. what you can try is.. update the user of total distance covered etc on a regular basis (like run keeper) and this will justify tracking location in background.
But first, you can try appealing to the review board explaining that you need to track location in background because you show entire route travelled by user when app comes to foregraound. and compare this to existing apps like run keeper and if you are lucky apple may approve your application without any changes...

- 10,385
- 2
- 35
- 58