Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

startMonitoringForRegion doesn't fire didEnterRegion and didExitRegion

I'm doing some test using estimote beacons and regions.

Reading the documentation as I start monitoring a region I'm going to tell my delegate that a specific region is being monitored, however, didEnterRegion and didExitRegion are never fired.

My delegate fires:

-(void)beaconManager:(ESTBeaconManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:(ESTBeaconRegion *)region

and

- (void)locationManager:(CLLocationManager *)manager didDetermineState:(CLRegionState)state forRegion:(CLRegion *)region

I didn't check if an error occurs into locationManager:didFailWithError:

At the moment I'm using the state to manually run two private methods that work as didEnter and didExit - in this case I'm also able to monitor the region but I didn't get why locationManager:didEnterRegion: and locationManager:didExitRegion: are never called.

Is someone facing the same behavior?

like image 441
Mario Catena Avatar asked Nov 27 '13 11:11

Mario Catena


1 Answers

There are several items to check. The one that addressed my problem was Enabling Background App Refresh in your device's settings (see screenshot below). I had this disabled as a battery saving measure. Monitoring will not work if this is disabled.

If this doesn't address your problem there is a great post you can read that details all of the items to troubleshoot.

iBeacon StartMonitoringForRegion Doesn’t Work


Background App Refresh

like image 59
hylander0 Avatar answered Nov 06 '22 14:11

hylander0