How to get real time battery level on iOS with a 1% granularity
There are at least four different ways to read the battery level, and all four ways may return different values.
Here is a chart of these values through time.
The values were recorded with this iOS project: https://github.com/nst/BatteryChart
Please check out the code for reference.
UIDevice *myDevice = [UIDevice currentDevice];
[myDevice setBatteryMonitoringEnabled:YES];
double batLeft = (float)[myDevice batteryLevel] * 100;
NSLog(@"%.f", batLeft);
NSString * levelLabel = [NSString stringWithFormat:@"%.f%%", batLeft];
lblLevel.text = levelLabel;
check out this site : Reading the battery level programmatically
but, carefully use. all of the APIs used here are undocumented on the iPhone, and will probably lead to a rejection if you submit this application to the App Store. Although battery charge status is not exactly, I'd recommend using the UIDevice battery monitoring methods.