You need to call the requestAlwaysAuthorization
(or the “when in use” counterpart) every single time before you start ranging/monitoring, not just the first time the app is launched. It will trigger the popup the very first time it is called, but it’s still required by iOS to keep calling it after that whenever you initialize the ESTBeaconManager anew.
Looking at the code snippet you posted in this thread, I’d suggest to try changing:
if ([ESTBeaconManager authorizationStatus] == kCLAuthorizationStatusNotDetermined)
{
[self.beaconManager requestAlwaysAuthorization];
[self initialiseRanging];
}
else if([ESTBeaconManager authorizationStatus] == kCLAuthorizationStatusAuthorized)
{
[self initialiseRanging];
}
… to a simple:
[self.beaconManager requestAlwaysAuthorization];
… and move the if/else checks and initialiseRanging
into the didChangeAuthorizationStatus
method. This is a more idiomatic way to perform the authorization checks.