I\'m using this function to get current battery level of device:
[[UIDevice currentDevice] setBatteryMonitoringEnabled:YES]; UIDevice *myDevice = [UIDevice c
Swift version to get the battery level:
UIDevice.current.isBatteryMonitoringEnabled = true let batteryLevel = UIDevice.current.batteryLevel
batteryLevel return 0,39; 0,40 values for me.
batteryLevel