How Facebook Audience Network is hurting your iOS device’s battery life

Background:

Lior Azi
2 min readJun 1, 2016

Back in October 2015, Facebook app was accused of high battery usage/drain in their main app, due to background audio usage. ( link1 )

Battery life is a VERY precious thing for users and many went paranoid about it, so paranoid some of them even uninstalled the Facebook app completely, and used Facebook via Safari which granted them up to 15% of battery life.( link2 )

Facebook dug deep into their code finding the drain came from a background audio issue, and a processor issue which were fixed. ( link3 ) The majority of people thought this will put an end to the whole battery story, but unfortunately there is a new episode…

Today:

After users have escaped the battery drain of the Facebook App, it seems that now our battery will be hammered by EVERY app that integrates the Facebook Audience Network SDK. The Facebook Audience Network lets an app developer extend his campaigns beyond Facebook to reach his audiences on mobile apps, mobile websites, Instant Articles, and videos,released first on October 2014.

It was found that the Facebook Audience Network SDK begins a background task which makes the app alive for 30 seconds more, which means it is using 30 seconds more of CPU time that has impact on the phone battery (method name: beginBackgroundTaskWithExpirationHandler) which tries to run (if the system allows it) whenever you press the home button in the app that integrated the SDK.

So every app that will use the Facebook Audience Network SDK will act in the same way, which will gain the percentage of battery use for each, which can have a impact on the overall battery time. In addition there is no place where Facebook makes developers aware of this matter.

Solution? It’s not currently possible to block the ability of an app to begin a background task. Disabling “Background App Refresh” or “Location Services” would not help you in this matter 😥. Three weeks before WWDC16, we can only hope that Apple will have a solution for that on the iOS10, which will greatly help iOS users.

-Lior Azi (@liorazi)

.

--

--

Lior Azi

Mobile Engineer • UX Addict • Music Enthusiastic