How do diagnose battery life problems?

In recent releases of my app, I’ve noticed that when I leave the app backgrounded, it’s just eating up my battery. If I go to the iOS settings, it shows that my app is always eating a ton of battery.

What happens when an app is backgrounded? Do the setInterval calls still run? Do network requests from the app still run?

Is there any documentation on this anywhere? My understanding is that the app essentially freezes and all the intervals stop, etc.

I’m also doing background location, but that only gets used like 7 times a day so that most likely can’t be it.

SDK 40 Managed

I’ve just started looking into a similar problem. This question’s a few weeks old - did you end up finding any answers?

No definitive answers but I did some experiments. When I put the app in “When In Use” it almost uses no battery when backgrounded. When it is “Always” it ends up being very high in the list, so I’m 99% sure it has to do with my background location updating.

I’m going to toy with the settings so that it doesn’t check as often and see if I can improve the battery performance.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.