All devices non secure, set development mode, I STILL CAN NOT get it to give me more than just the one. They appear fine in the estimote app, but not in my code.
No idea what I’m doing wrong. Please help!
apologies in advance, I don’t have time to wrestle with every other forums code formatter.
public func initRegion()
{
var i = 1
for beaconInfo in beaconsOfInterest
{
let uuid = UUID(uuidString: beaconInfo.uuid)
let idStr = "com.whatever.beacon\(i)"
beaconRegion = CLBeaconRegion(proximityUUID: uuid!, major: CLBeaconMajorValue(beaconInfo.major), minor: CLBeaconMajorValue(beaconInfo.minor),
identifier: idStr)
beaconRegion.notifyEntryStateOnDisplay = true
beaconRegion.notifyOnEntry = true
beaconRegion.notifyOnExit = true
locationManager.startMonitoring(for: beaconRegion)
i += 1
}
}
//array is always just 1 and with the same single device
public func locationManager(_ manager: CLLocationManager, didRangeBeacons beacons: [CLBeacon], in region: CLBeaconRegion)
{
for beacon in beacons
{
if(beacon.proximity.rawValue <= minProximity.rawValue && beacon.proximity != .unknown)
{
if let handler = onBeaconWithinRange
{
handler(beacon, region)
}
}
}
}