Here is my code:
for (NSString *serviceUUID in _serviceUUIDs) {
NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:serviceUUID];
CLBeaconRegion *appBeaconRegion = [[CLBeaconRegion alloc] initWithProximityUUID:uuid identifier:SERVICE_IDENTIFIER];
appBeaconRegion.notifyEntryStateOnDisplay = YES;
appBeaconRegion.notifyOnEntry = YES;
appBeaconRegion.notifyOnExit = YES;
[_appBeaconRegions addObject:appBeaconRegion];
[_locationManager startMonitoringForRegion:appBeaconRegion];
[_locationManager startRangingBeaconsInRegion:appBeaconRegion];
}
To clarify, "_ serviceUUIDs" is an NSArray of NSStrings containing five UUIDs. I use Locate iBeacons for testing and find that the last region to be added is the only one found. It also seems to be controlled by only one. I determined this by setting "_ locationManager.monitoredRegions" .
There are several streams here that say that you can control several areas of the lighthouse. Does anyone have thoughts on why it doesn't work for me? Thanks!