I am trying to return the battery level of the device. But, no matter what my battery is, it returns 1.0. Here is my code that I am using.
Code:
UIDevice *myDevice = [UIDevice currentDevice];
[myDevice setBatteryMonitoringEnabled:YES];
float batLeft = [myDevice batteryLevel];
NSLog(@"%f",batLeft);