How to fetch battery voltage and current capacity of battery for iOS 12 using iOKIt

We are using IOKit frame for battery-related info but now we are not able to fetch data like battery voltage and current capacity for iOS 12 beta 9. Please let us know if there is an alternate way for it

Replies

I am curious about the answer too. Do you have any information?


For instance, Apps Like Battery Life or Battery Care are still on the App Store (and accepted by the Apple Review team). They both show the same Battery Wear rate. The only solution is to use the IOKit private framework or have the app compiled with SDK 10 or 11 max. If not, I'm wondering how they can get battery information without private APIs.


To go further, because battery information decrease on each iOS version, I think the Apple Review team will refuse Battery apps shortly. Why? Apple provides battery health status in the iOS settings since iOS 11.3. With iOS 12, this feature is not in beta anymore. Apple users who will come to an Apple Store by saying "Your battery health status is wrong, here what Battery Life is saying" will be one situation that Apple will try to avoid the most.

Battery Life said they currently working on a fix for a future update on iOS 12. I'm wondering witch one...

>I'm wondering witch one...


Perhaps they will revert to the old method of guessing, hoping the user won't question their estimates.

The recent answer from bug-report:


"Engineering has determined that this issue behaves as intended based on the following information:


Not letting 3rd party apps access all this battery data is by design. This data is sensitive, has privacy implications. We are investigating API’s to let people find out about the system power pressure, that’s what should be used to limit performance requirements in such events."

So, guessing, then - thanks for the followup, good info.