I would like to create an ‘official’ randomized UUID in my application, before/instead of IOS’s CoreBluetooth library receiving an iBeacon packet from an actual iBeacon device and generating a randomized UUID at that time.
Let me explain. CoreBluetooth, when it receives an iBeacon packet, will create a randomly generated UUID that it will use to associate to a specific iBeacon device. Using CoreBluetooth, developers have NO access to the actual UUID, Major/Minor, TX Power, or MAC address of the advertising iBeacon device, they only have access to the IOS randomly generated UUID. IOS uses the MAC address of the iBeacon as its unique identifier to generate the random UUID, not the broadcasted iBeacon’s UUID. In testing, I’ve changed the UUID of an iBeacon a few times, and when I transmit the advertising packet, IOS still reads it as the same iBeacon. But, when I change the MAC address of the iBeacon, IOS perceives it as a different iBeacon. The IOS randomly generated UUID is persistent between applications running on the IOS device until the device is rebooted.
I use the word ‘official’ because, although it seems I can generate UUID’s with specific functions in the CoreBluetooth library using UUIDWithString, UUIDWithData, UUIDWthNSUUID,
I would like to make sure I’m creating THE random UUID that IOS will register and properly associate with that iBeacon.
The IOS CoreBluetooth process I’m trying to accomplish myself typically runs the first time IOS receives a specific iBeacon’s advertisement. My plan is to preempt this so that the first time it receives a packet from that iBeacon, the IOS device already has its random UUID generated and associated with that iBeacon. My application will contain a list of MAC addresses to generate these random UUIDs from.