How to get Mac Address From CBPeripheral And CBCenter

Omid Mafakher picture Omid Mafakher · Oct 15, 2015 · Viewed 14k times · Source

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

Answer

Paulw11 picture Paulw11 · Oct 15, 2015

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.