Battery drain when using CoreLocation Significant Location Monitoring & CoreBluetooth Battery drain when using CoreLocation Significant Location Monitoring & CoreBluetooth ios ios

Battery drain when using CoreLocation Significant Location Monitoring & CoreBluetooth


At the end of the day, Apple's suggestion of removing location from UIBackgroundModes fixed our battery drain issue.

In order to still get locations in the background we had to wrap the [locationManager startLocationUpdates] & [locationManager stopLocationUpdates] calls with:

[[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler];[[UIApplication sharedApplication] endBackgroundTask:];


You could debug status of the app using any repetitive signal sound. Just make sure you didn't put 'plays audio' in the background modes requirements for this test.If your app running - you will hear this sounds even application is in the background. If app is suspended - you will hear nothing. This is probably simplest method to detect that the app is not properly suspended.

Using Profiler for debug of this issue is problematic because many things works different in debug mode when device connected to computer. Especially power saving things.

Also, please make sure you do everything right in response to significant location changes. If you start location updates - make sure you've set some timer (for 3 minutes, for example) that shuts down location updates.Anyway, the iOS will kill you app even it started location updates from response to significant location changes. Does not matter what you did started in response - the app will be killed in 10 minutes if still running - pay attention to crash logs - such event will be logged there.

Also, check all your 3rd party code and libs - perhaps some of them turns GPS and use it for somethings. Mostly paranoid, but may happen for analytic and advertising targeting purposes.


CoreLocation enabled applications generally made for background mode , so it can run in background, definitely it usage more battery , for my suggestion is always try to stop the location service when it is no need .

[locationManager stopUpdatingLocation];

then after according to your requirement then start accordingly,

Thanks