I registered my own location manager to monitor and range a few beacons:
[self.locationManager startMonitoringForRegion:region];
[self.locationManager startRangingBeaconsInRegion:region];
My understanding is, when one or more beacons is found this delegate method is called:
- (void)locationManager:(CLLocationManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:(CLBeaconRegion *)region
This delegate method is indeed called when I turned on my beacon, but the beacons array is empty. Is there any reason why my beacon is not listed in that array?
Here's a screenshot to illustrate this situation:
didEnterRegion:
or didDetermineState:
is called, but that still result in the same thing.[self.locationManager requestWhenInUseAuthorization];
.NSLocationWhenInUseUsageDescription
key in my plist.Turns out this is because I am not using unique identifier when creating CLBeaconRegion
.
Special thanks to nayoso for helping me solve this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With