IOS 9: low energy & # 8594; Do developers need to prepare for this?

It was mentioned in WWDC 2015 that the batteries last for one hour and have low power consumption, which can extend the battery life by another three hours.

Should iOS app developers do anything for this new feature? Is there something that their applications should do (or not do) when the batteries are in this discharged state?

+6
source share
4 answers

It seems that this has nothing to do with third-party applications and more about iOS itself. Here is the article I found:

http://www.redmondpie.com/how-ios-9-low-power-mode-for-battery-life-saving-works/

Here's another article that seems to confirm this only for iOS itself (and background processes like downloading, which may affect some apps): http://www.idownloadblog.com/2015/06/08/low-power -mode-in-ios-9 /

As far as I know, none of this requires any interaction with the developer. From Apple’s point of view, this would be a bad idea, since then the developers could essentially choose whether to execute or not, and make their Low Power mode useless (because many developers will not want to make their application worse)

On the side of the note, I'm glad that iOS 9 will no longer tan my screen if my device is face down on the table and I receive a notification. If you read, there are several new energy-saving features that are not related to using Low Power mode.

+1
source

Perhaps this is due to new discretionary networking tasks introduced with iOS 7 and other APIs that reduce battery life. Check out the following sessions from WWDC 2014:

Writing an Energy Efficient Code, Part 1

Writing an Energy Efficient Code, Part 2

0
source

You can register for NSNotification for NSProcessInfoPowerStateDidChangeNotification

Or use this NSProcessInfo.processInfo (). isLowPowerModeEnabled

https://developer.apple.com/library/prerelease/ios/documentation/Performance/Conceptual/EnergyGuide-iOS/LowPowerMode.html

0
source

Update for 9.0.2: I'm sorry that the specified answer is incorrect (more). When in power mode, applications can no longer respond to push messages, because the corresponding function

- (void)application:(UIApplication*)application didReceiveRemoteNotification:(NSDictionary*)userInfo 

not called.

I wonder how messaging services communicate? Anyone got it?

See also my explicit question - with more details on this subject: IOS9 Battery Saver - didReceiveRemoteNotification not called

0
source

Source: https://habr.com/ru/post/989224/


All Articles