If I want to monitor many different regions at once, can I pull them from a server and put in a for loop?
example
for ( NSUUID *uuid in fooArray )
{
//Set up self.beaconRegion
//call [self.beaconManager startRanging in self.beaconRegion];
}
It works but it only seems to monitor the last region. I do give each a separate identifier but its only picking up the last one as well
It should work just fine. Keep in mind that you’ll receive as many calls to the didRangeBeacons:inRegion:
as the number of regions you defined and started ranging for beacons … which can sometimes leave an impression that only the last region is being ranged.
If you want a single didRangeBeacons
call with the beacons from all your regions, set returnAllRangedBeaconsAtOnce
to YES
.
1 Like