Proper Way to Identify Bluetooth Peripheral

We need to identify the bluetooth peripheral connected previously on a device.


In reference to the iOS documentation on CBPeripheral class:

https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/CBPeripheral_Class/index.html#//apple_ref/occ/instp/CBPeripheral/name

There are 2 properties:

  • CFUUIDRef UUID (available on iOS 5.0 - 7.1)
  • NSUUID *identifier (available on iOS 7.0 - 7.1)


It looks like both properties are deprecated now, and Apple provides no suggestion on the updated solution. What is the alternative / updated API call now?

The correct solution now is to use the NSUUID *identifier on CBPeripheral objects.


The identifier property is now moved to the CBPeer object, but as CBPeripheral is an object of type CBPeer, the NSUUID *identifier property is available to your CBPeripheral objects.


What the documentation says is technically correct, albeit confusing. The property is indeed deprecated as a direct property, even though it is still available through inheritance.

Proper Way to Identify Bluetooth Peripheral
 
 
Q