iOS dev: issue with iBeacon (but not with iBeacon and Eddystone)


I am using a very basic implementation of a CLLocationManager in Swift4 to develop a simple app for detecting beacon.
I have 2 beacons, one is configured with iBeacon only and the other is configured with both iBeacon and Eddystone.

When I run the same code on the two beacons, it only work with the beacon configured with iBeacon and Eddystone. (the didDeterminateState delegate function is called)

What am I missing ?


var locationManager = CLLocationManager()
locationManager.allowsBackgroundLocationUpdate = true
locationManager.delegate = self
var beacons: [CLBeaconRegion]

beacons.foreach({ beacon in
locationManager.startMonitoring(for: beacon)
locationManager.startRangingBeacons(in: beacon)

If you need more information, don’t hesitate to tell me.

Thank you.