When my app is first launched, the battery level is correctly retrieved by float batteryLevel = [UIDevice currentDevice].batteryLevel
. However, when I try to retrieve it later on in my code, I always get the same value even if the battery level changed.
Subsequent calls to [UIDevice currentDevice].batteryLevel
always return the same result as the first one, for example: if the battery level was 30% when my app was launched, 10minutes later when I try to retrieve it again, I get 30% as well, but in reality, the battery level is 40% at this point.
Does anyone have any idea why might this happen?