Fetch device and baterry information from device?

I'm working on ios app with iot, i have following questions regarding:

  1. I want to fetch "Battery Temp, Voltage, Current, Percentage, Charging State, Battery Capacity, Charging count, Incoming Calls, UUID, Phone Model, Phone Manufacture in Swift?

  2. We have class in objective c - UIDeviceListener, But its comes under IOKit framwork - if you want to submit an app using IOKit framework is risky because I red Apple may not allow that, Then Swift has UIDevice, but its providing limited information, what is alternate solution or workaround for this?

Where did you read it is risky ? Only point is that you have to use only public API.

See this old reference discussion on the topic:

https://developer.apple.com/forums/thread/51595

To be clear, I/O Kit is not public API on iOS and its descendents (in contrast to macOS, where is is public API) and thus using it is grounds for rejection.

The only supported way to get battery info on iOS is the various properties on UIDevice. If you need more detailed info than that, my only suggestion is that you file an enhancement request describing your requirements.

Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Fetch device and baterry information from device?
 
 
Q