我正在使用iBeacons。我有多個信標,每個信標具有相同的UUID,主要但不同的次要值。這兩個設備都是有區分的,但它們並沒有一起被接收,locationManager:didRangeBeacons:inRegion:委託回調「beacons」數組一次僅包含1個信標。多個信標didRangeBeacons代表一次只返回一個信標的電話
我才知道,使用多個區域將有回調分別
這是怎麼了監管碼和測距標
// Initialize and monitor regions
for (NSString *serviceUUID in _serviceUUIDs) {
// Initialize region
NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:serviceUUID];
CLBeaconRegion *appBeaconRegion = [[CLBeaconRegion alloc] initWithProximityUUID:uuid major:major minor:minor identifier:identifier];
// Specify notifications
appBeaconRegion.notifyEntryStateOnDisplay = YES;
appBeaconRegion.notifyOnEntry = YES;
appBeaconRegion.notifyOnExit = YES;
// Add to regions
[_appBeaconRegions addObject:appBeaconRegion];
// Begin monitoring region and ranging beacons
[_locationManager startMonitoringForRegion:appBeaconRegion];
[_locationManager startRangingBeaconsInRegion:appBeaconRegion];
}
我想擁有所有在範圍內的一個回調中的信標
如何使用不同的小的單一區域,標識值的所有信標
任何幫助APPR eciated ..
感謝