Become a MacRumors Supporter for $25/year with no ads, private forums, and more!

Facebook Implements Fix for iOS App Battery Draining Issues

MacRumors

macrumors bot
Original poster
Apr 12, 2001
50,441
11,827



Facebook's newest iOS update, out today, fixes a major battery draining bug that some Facebook users have been experiencing in recent weeks. Affected users were seeing large amounts of battery drain on their iPhones due to Facebook running in the background, something that happened even when background app refresh was toggled off in the Settings app.

While the latest Facebook app release notes don't include a reference to the issue, Facebook engineering manager Ari Grant wrote a post (via TechCrunch) explaining the issues behind the battery drain and what Facebook has done to fix it. According to Grant, there were several factors that contributed to the problem, including a "CPU spin" in the network code and silent background audio sessions that kept the app awake even when it wasn't open.


The first issue we found was a "CPU spin" in our network code. A CPU spin is like a child in a car asking, "Are we there yet? Are we there yet? Are we there yet?"with the question not resulting in any progress to reaching the destination. This repeated processing causes our app to use more battery than intended. The version released today has some improvements that should start making this better.

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.
When the Facebook battery draining issue first began circulating, MacStories' Federico Vittici hypothesized it was caused by silent audio running in the background, which turned out to be correct. Vittici believed Facebook used silent audio intentionally as a way to keep the app active in the background for tasks like pre-loading content, which he said showed "a deep lack of respect for iOS users."

Regarding today's comment from Facebook engineer Ari Grant, TechCrunch's Matthew Panzarino also suspects there's a possibility Facebook's use of background audio might have been done on purpose, despite Facebook's claim that it was an unintentional bug.
So if you believe Grant, this is a simple bug. It could happen to anyone etc etc. If you don't believe him, it was a thing Facebook was doing to make their app work a way they wanted it to but Apple didn't and they got caught. I'm not gonna pass any judgments here -- bugs happen all of the time and it's not fun to get pilloried over a simple mistake. Either way, attention was brought to it and it's fixed now.
Grant says fixes have been implemented for both of the issues causing battery drain and Facebook users "should see improvements in the version released today." Facebook will also continue to improve the battery usage of its iOS app.

Article Link: Facebook Implements Fix for iOS App Battery Draining Issues
 

teknikal90

macrumors 68040
Jan 28, 2008
3,166
1,504
Vancouver, BC
still don't trust it.
and I don't believe they 'jumped on it so quickly'.
The issue had been apparent since iOS 9.0 beta 1 showed granular battery usage details....6 months ago.
They just got caught red handed and decided now's the time to finally fix their own exploit.

Browser facebook is still better.
 
Comment

skwood

macrumors 6502a
Jul 8, 2013
890
597
Tonbridge, UK
What's done is done. Glad it is fixed but for a company such as Facebook to "miss" this for so long isn't great. It's going on far too much in the tech community. Worryingly the more and faster we advance, the more likely more things will slip through nets.
 
Comment

nutmac

macrumors 601
Mar 30, 2004
4,806
3,385
Regarding today's comment from Facebook engineer Ari Grant, TechCrunch's Matthew Panzarino also suspects there's a possibility Facebook's use of background audio might have been done on purpose, despite Facebook's claim that it was an unintentional bug.
Facebook has over 100 engineers working on iOS app. It's hard to believe that something so major was an unintentional bug, from a company known to violate user privacy so many times.
 
Comment

farewelwilliams

macrumors 68040
Jun 18, 2014
3,657
14,793
When the Facebook battery draining issue first began circulating, MacStories' Federico Vittici hypothesized it was caused by silent audio running in the background, which turned out to be correct. Vittici believed Facebook used silent audio intentionally as a way to keep the app active in the background for tasks like pre-loading content, which he said showed "a deep lack of respect for iOS users."

that's grounds for removal of Facebook from the app store.
 
Comment

popeye88

macrumors member
Sep 18, 2014
65
11
I don't trust them either. Wish there was a better platform that is as widely adopted as facebook, while I don't necessarily like to post every little detail of my life, it is nice to keep in touch with some folks from distant parts of my life which I otherwise would not likely hear from.
 
Comment

GadgetBen

macrumors 68000
Jul 8, 2015
1,546
2,829
London
Nope.

I've downloaded the new update and the app is still draining at 39%.

By far the worse performing app for battery life
 
  • Like
Reactions: Blackstick
Comment

RossMc

macrumors 65816
Apr 30, 2010
1,179
44
Newcastle, UK
So with this background audio issue being fixed does this mean it fixes when you close then Facebook app and play music the audio won't be lower than normal anymore? It used to happen all the time when I had my phone connected to my car Bluetooth.
 
Comment

GadgetBen

macrumors 68000
Jul 8, 2015
1,546
2,829
London
I too wish there was a decent alternative.

I'm aware of all the other sites such as Ello but they just aren't good enough.

Only a matter of time until Facebook bursts
 
Comment

jpgr15

macrumors 6502a
Apr 28, 2015
528
992
This whole story leaves a bad taste in my mouth. If this was intentional, how arrogant of Facebook to exploit iOS and its users.

FB can fly a kite; their app sucks. The whole messenger app debacle was stupid.

I don't know why I'm surprised though. Facebook has been full of arrogance and hypocrisy since day one.
 
Comment

joeblough

macrumors 6502
Sep 30, 2006
404
256
man the busy wait is such a rookie mistake that it seems like they might just be incompetent. on the other hand they may have been trying to implement multiple methods to keep the app running. way to go FB.
 
Comment

jpgr15

macrumors 6502a
Apr 28, 2015
528
992
So with this background audio issue being fixed does this mean it fixes when you close then Facebook app and play music the audio won't be lower than normal anymore? It used to happen all the time when I had my phone connected to my car Bluetooth.

I've had the same issue; and here I thought it was just another iOS bug. Nope, just Facebook being Facebook.

Of course, "What's New" doesn't say anything specific but the standard text that's they've had for years.

I hate that. It's so lazy. Many users would like to know what they're getting with an update.
 
  • Like
Reactions: V.K.
Comment

C DM

macrumors Sandy Bridge
Oct 17, 2011
50,845
19,023
Facebook has over 100 engineers working on iOS app. It's hard to believe that something so major was an unintentional bug, from a company known to violate user privacy so many times.
Over 100 engineers for a single iOS app?
 
Comment

C DM

macrumors Sandy Bridge
Oct 17, 2011
50,845
19,023
man the busy wait is such a rookie mistake that it seems like they might just be incompetent. on the other hand they may have been trying to implement multiple methods to keep the app running. way to go FB.
All kinds of software has all kinds of bugs, doesn't necessarily mean incompetence or malice.
 
Comment
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.