iosibeacon

iOS iBeacon: How to get all of proximityUUID programmatically?


I want to see all of proximityUUID of advertising packets programmatically. Some articles say that it is impossible on iOS but Android is possible. But I cannot believe it because I found the fantastic app "BLExplr" has the feature. I need to implement the function into my app. Does anyone knows how to do it or good examples? Any help will be appreciated.

(UPDATE 2014/1/17)

I believe @davidgyoung answer is right. Estimote beacon's proximityUUID is "B9407F30-F5F8-466E-AFF9-25556B57FE6D" but displayed my Estimote beacon's UUID on BLExplr app is another ID.

enter image description here enter image description here


Solution

  • Unfortunately, you cannot to this on iOS. When you say that BLExplr and LightBlue can do this, you are confusing the Bluetooth service UUID with the iBeacon Proximity UUID. These are two very different things.

    The Bluetooth service UUID is visible to iOS, but has nothing to do with an iBeacon's identifiers, and is useless for working with iBeacons. The service UUID is generated by iOS each time a bluetooth device is seen, and stays the same only for the duration of time the bluetooth device is in range. If you take a bluetooth device away and bring it back later, it will have a different service UUID.

    An iBeacon's identifiers (ProximityUUID, Major, Minor) are embedded inside the body of the Bluetooth advertisement. The problem on iOS devices is that Apple's CoreBluetooth APIs disallow access to the raw advertisement body, so no third-party app is able to read these identifiers. Apple only allows access to these identifiers using the special iBeacon CoreLocation APIs, but these APIs require you to know the Proximity UUID up front.

    Sorry, I know this is not the answer you want to hear! (I'm sorry about it, too!) For what it's worth, you can do this on Android, MacOS, Linux and Windows.

    See details here.