Facebook has taken to, shocker, Facebook to explain some of the issues causing significant iPhone battery drain when using its app. The app has received a lot of criticism in the community in recent weeks with users reporting incredibly high levels of background activity time for disproportionally low time with the app actually in use. This included when iPhone users had explicitly turned off Background App Refresh in Settings. Facebook says it has started to fix battery drains issues with the latest version of the app in the App Store, version 42.0.
Ari Grant says there are two main problems with the app as it stands. One of which is a CPU spin state where the app would be instructing the CPU to be constantly doing ‘something’, even if the activity was unnecessary. Hence, the app would be using battery unnecessarily as it was keeping the CPU working without achieving any task for the user.
The other issue is related to improper management of audio sessions. This explains the prolonged background audio sessions. According to the post, if you left the Facebook app whilst watching a video the app would continue audio playback of the paused video. This effectively meant the app was playing silence indefinitely, through the background audio session. Facebook claims the app isn’t doing anything nefarious whilst it is in the state.
The second issue is with how we manage audio sessions. If you leave the Facebook app after watching a video, the audio session sometimes stays open as if the app was playing audio silently. This is similar to when you close a music app and want to keep listening to the music while you do other things, except in this case it was unintentional and nothing kept playing. The app isn’t actually doing anything while awake in the background, but it does use more battery simply by being awake. Our fixes will solve this audio issue and remove background audio completely.
The update released today includes improvements for both of these problems. They are committed to continuing improving battery usage of their app, which will benefit the iPhone platform as a whole — the Facebook app is the #1 most popular app for the phone.