Facebook iOS App Battery Explanation
facebook.com
facebook.com
So after all the accusations of Facebook exploiting background audio to steal cycles for downloading content or tracking people's location it's just another case of Hanlon's Razor.
Autoplay: Never Autoplay Videos
We ended up wiring a disassembled iPhone to battery simulation hardware and are now able to measure battery drain while stepping through a debugger/pushing the phone through an integration test to identify power usage regressions.
Curious how other folks handle these issues.
https://hacks.mozilla.org/2014/04/measuring-power-consumptio...
One approach might be to use a thermometer or IR camera to keep track of the phone's temperature relative to ambient. If something is causing unusual amounts of battery drain, the phone is going to get (much) hotter.
[1] "Never attribute to malice that which is adequately explained by stupidity." https://en.wikipedia.org/wiki/Hanlon%27s_razor
Facebook has no by-the-books way to realize some issues like this are happening, largely because iOS makes this difficult to watch.
"To see how long each app has been open and onscreen, and running in the background, tap <clock icon>.
https://support.apple.com/en-ca/HT201264
Screenshot of the feature, since that page lacks it:
http://cdn.iphonehacks.com/wp-content/uploads/2015/06/ios-9-...
Battery stats telemetry is almost certainly only available to Apple, and not shared with third parties. (If you dig into your device's settings->logs, there are log files that seem to record every imaginable interaction with the device)
Also, for a long while, ios devices that have mounted the developer disk image provide some extra battery logging in settings, but that will only provide insight on the developer's own devices.
Edit: Here's a link to the apple docs that show apps have to declare what tasks they will perform in the background.
https://developer.apple.com/library/ios/documentation/iPhone...
I don't know what tipped me off that Facebook was the culprit but I was driving one day and my podcast went quiet, like a notification sound was about to happen. But nothing came and the audio stayed quiet for at least 30 seconds before I pulled over, opened the app list, and killed Facebook. Problem solved.
Also, coincidentally, I forgot to kill Facebook last night and when I picked up my phone this morning it was warm. Glad I remembered to leave it plugged in.
Downside of course is lack of push notifications and the like.
Maybe, just maybe, it was warm because it was being charged.
I guess we'll just have to trust this explanation?