7

I read some articles about battery life, for example http://www.wired.com/gadgetlab/2013/09/laptop-battery/

And I am curious, could I manage battery charging process? Is there a functions to manually stop charging in OS X? I found IOKit that helps to look to battery info, but I don't find such functions as stop charging / start charging.

But I also think that Apple engineers know their work very good and they already optimize battery charging / recharging process.

Kara
  • 6,115
  • 16
  • 50
  • 57
Dima Deplov
  • 3,688
  • 7
  • 45
  • 77
  • First question, which is inappropriate for SO, does the hardware even support commands from software to enable/disable charging? You should start your question here with whatever evidence you have that this is under software control to begin with. If you don't know, go ask a hardware question on SuperUser or the Apple SE site. – Ben Voigt Oct 03 '13 at 20:22
  • You might want to look into tools like [AlDente](https://github.com/davidwernhart/AlDente) (comes with a GUI), or [bclm](https://github.com/zackelia/bclm) (CLI). Those are softwares that write to the BCLM (battery charge level max) of SMC, so you can set a upper limit to which your Mac will charge its battery to. – toaruScar Sep 03 '20 at 03:45

2 Answers2

0

After some researches, I found that there is no such API, at least there is definitely no public API for managing this kind of stuff. From the other hand, in my humble opinion this is for the best. It's better leave this API for Apple engineers and programmers.

Dima Deplov
  • 3,688
  • 7
  • 45
  • 77
  • Found solution yet? – Volatil3 Jul 26 '16 at 16:14
  • @Volatil3, there is no solution yet, at least from Apple. This API is private. Maybe you could dig to some low level unix commands, but you won't be "invited" to the Mac App Store. – Dima Deplov Jul 27 '16 at 22:14
  • 1
    I disagree with "It's better leave this API for Apple engineers and programmers." It would be nice to be able to disable charging to lengthen the battery life. – SomeGuyOnAComputer May 18 '20 at 16:04
  • @SomeGuyOnAComputer thanks for your comment, I don't have competence in the area of power supply and batteries. That's why it's still valid for me, and might not be true for you. – Dima Deplov May 20 '20 at 10:46
  • 1
    How did Aldente achieve it? –  Dec 12 '21 at 02:47
0

Iphone doesn't charge at times when you plug it into a new accessory till you unlock the phone. It is possible to do it using existing hardware but not sure how to achieve it. I don't think Apple will make the API public for sure