ioscore-bluetoothbtle

How to get Mac Address From CBPeripheral And CBCenter


I need to take target mac address from input connection and outgoing connection from CBPeripheral And CBCenter. identifier dose not define in them. look was remove from iOS 7. Is there any other way?

https://developer.apple.com/library/prerelease/ios/documentation/CoreBluetooth/Reference/CBPeripheral_Class/index.html


Solution

  • You can't get the MAC address for a CBPeripheral but you can get the identifier property, which is a UUID that iOS computes from the MAC amongst other information.

    This value can be safely stored and used to identify the same peripheral in the future on this particular iOS device.

    It cannot be used on another iOS device to identify the same peripheral.