How to read battery level on iOs?

Hi Guys!
I know, you’re smart aliens from another planet :slight_smile: and are doing a great job. But, I don’t know anything about low level iOs framework, and I’m from planet earth. So, I would be very grateful if you can show me how to read battery level on iPhone/iPad.

Kind regards and thanks in advance

UIDevice device = UIDevice.CurrentDevice();
device.batteryMonitoringEnabled = true; // need to enable this first

Debug.Log("Battery state: " + device.batteryState);
Debug.Log("Battery level: " + device.batteryLevel);

If you want to be notified when the battery state or level changes, you can subscribe to device.BatteryStateDidChange and device.BatteryLevelDidChange events. Please see UIDevice API docs for more info.

In PlayerSettings under Resolution and Presentation there is an option to hide the status bar. If you uncheck the box you will be able to see the status bar (battery life, wifi etc) whilst in app.