I am facing iPhone Battery Drain problem. In my app, I am using the accelerometer to count the steps. I am subscribing to the location manager in order to keep accelerometer active in background (so that it keeps logging steps). Of course I am using a large distance filter so the localization should not cause such a big battery drain.
Location manager setting:
locationManager.desiredAccuracy = kCLLocationAccuracyThreeKilometers;
locationManager.distanceFilter=3000;
//Even I had used startMonitoringSignificantLocationChanges also.
[locationManager startMonitoringSignificantLocationChanges];
Unfortunately, after around 5 hours my battery is empty. In comparison with the app "Moves"(https://itunes.apple.com/in/app/moves/id509204969?mt=8 ) their application is consuming very litle battery yet they still track ALL the activity while the app is in the background. I am amazed how they handle battery problem. When they are also using accelerometer & location manager. I am very thankful for any guidance offered in this respect on how they achieve this.
Thanks!
You should look at using the Core Motion framework rather than the location manager. Do a search on "Motion Events" in the Xcode help system to find the relevant docs.