Disable Network anticipation

HI,


I have an iOS app and we have a regular tracking network update whcih is using alot of power. We are looking for various ways of reducing this. Is it possible to power down netowrking hardware quicker? as in decrease the additional period of time they are turned on in anticipation of more work ?


Thanks


Feras A.

Replies

>decrease the additional period of time they are turned on in anticipation of more work


Kind of a catch-22, isn't it?


If you reduce network pre-loading pre-need, you prolong network fetch post-need. What you save on the front end you spend on the back. As well, I'm not confident your app is allowed to directly control the throttle - other apps may have their own needs and the system's job is to cater to the greater good, I think.


What have you already done to reduce power usage by your app outright? Aer there any power usage metrics you can share from your testing?


Ken

I have an iOS app and we have a regular tracking network update whcih is using alot of power.

Please explain more about what you mean by “regular tracking network update”. Does this apply occur only while your app is in the foreground? Are you tracking changes in the local network environment? Or at changes that occur on some server available on the wider Internet?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

HI,


Basically we are pinging to gosquared every 20 seconds for real time analytics, even when the back is in the background.


Best


Feras

when the app*

Basically we are pinging to gosquared every 20 seconds for real time analytics, even when the back is in the background.

Yeah, don’t do that, it’ll severely reduce battery life. Even if you had direct control over the networking hardware, and could thus force it to power up and power down at will, which you don’t, pinging the network every 20 seconds would still severely reduce battery life. Some network interface specs require that the hardware stay active for a certain minimum amount of time, and that time is of the order of tens of seconds, so pinging every 20 seconds is basically keeping that interface in a high power state continuously.

You need to change your approach. I recommend that you do this work server side, and then use push notifications to tell the device that something noteworthy has occurred.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"