6

I love the Low Power Mode feature. When I'm travelling or in other situations where reliable communication is more important than user experience, I want to always have it enabled, sometimes for days at a time.

However, iOS automatically turns it off after the phone has been charged, requiring me to remember to go in and re-enable it after unplugging my phone. I occasionally forget.

Is there any way (including third-party apps, excluding rooting/jailbreaking) for me to automatically or persistently enable Low Power Mode, aside from the system's automatic behaviour at 20%? A way to leave it on indefinitely, or a way to have it automatically activate earlier (such as at 50%), or a way to activate it based on a schedule?

If there's no user-accessible way to do this yet, I would also be interested in knowing if there are any mechanisms in the operating system (URL schemes, framework APIs) that could potentially be used to control Low Power Mode.

7
+50

Yes, the _CDBatterySaver API in the CoreDuet (Private*)Framework can be used to toggle low power mode.

An example invocation, untested:

#import <CoreDuet/CoreDuet.h>
#import <objc/runtime.h>

-(void)setLowPowerMode:(BOOL) isOn {
    _CDBatterySaver *batterySaver = [objc_getClass("_CDBatterySaver") batterySaver];
    int nextState;

    if(isOn) {
        nextState = 1;
    } else {
        nextState = 0;
    }

    if([batterySaver setMode:nextState]) {
        NSLog(@"Set power mode state");
    }
}

I'd wrap this in an app with a background task to watch for low power mode (both well documented APIs). This can be done with Xcode as Apple allow building and installation of apps to your phone without requiring a developer license (IIRC).

*See answer to question how to import private frameworks in xcode. Note: header files can be found on GitHub without the need for a jailbroken device.

  • Aha, a private API? I hadn't considered that possibility, but it makes sense. Perhaps not user-friendly, but hopefully this should be enough for me to solve my issues with a little work. Thanks! – Jeremy Banks Jun 27 '16 at 16:14
  • @JeremyBanks Glad to help. I'll give Xcode some attention later and look at getting a working example up and running. You've intrigued me! – Stan Hutcheon Jun 27 '16 at 16:19
  • Somewhat related: is there a way to do the same on OS X? – Brethil Jul 1 '16 at 9:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .