Search for all iBeacons and not just with specific UUID

Christian picture Christian · Sep 13, 2013 · Viewed 23.1k times · Source

Is it possible to search for all iBeacons which are nearby? I know it's possible to search iBeacons by UUID. But i want to find all iBeacons nearby.

Answer

Joride picture Joride · Sep 13, 2013

An iBeacon is a region, and has as defining property the UUID. Therefore, you can only search for the ones matching a UUID. After you find one or more with a specific UUID, you can figure out which is closest using the delegate callbacks, where the beacons are stored in an array ordered by distance.

There is great sample code on this and also a pretty detailed WWDC video session: "What's new in Core Location"