Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate or create iBeacons UUID?

Apple released iOS 7 with iBeacons technology. Does Apple release any more details about this iBeacons technology?

In my project, I will create an iBeacons. How can I pick the UUID of iBeacons? Is there any rules to generate iBeacons UUID? Can I use random number as UUID?

like image 291
Yi Jiang Avatar asked Dec 04 '22 09:12

Yi Jiang


2 Answers

You can use the uuidgen command in Terminal to generate a UUID, create an NSUUID and then instantiate a CLBeaconRegion instance:

NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:@"10D39AE7-020E-4467-9CB2-DD36366F899D"];

CLBeaconRegion *region = [CLBeaconRegion initWithProximityUUID:uuid
                                                    identifier:@"unique region identifier"];

See Apple's AirLocate sample project from WWDC 2013 for more info or you can review my blog here for more info: http://www.captechconsulting.com/blog/christopher-mann/ios-7-tutorial-series-core-location-beacons.

like image 176
Christopher Mann Avatar answered Dec 24 '22 11:12

Christopher Mann


If your question was more about where to generate proximity UUID for iBeacon app, I suggest using free online application OpenUUID we have created:

http://openuuid.net/

Besides generating unique proximity UUIDs for your apps (OpenUUID detects collisions, even though their probability is astronomically small), OpenUUID lets you access the list of UUIDs that you previously generated, so that you can keep track of them. Hope the service helps...

like image 38
Petr Dvořák Avatar answered Dec 24 '22 10:12

Petr Dvořák