如何从CBPeripheral和CBCenter获取Mac地址 [英] How to get Mac Address From CBPeripheral And CBCenter
问题描述
我需要从CBPeripheral和CBCenter的输入连接和传出连接中获取目标mac地址。标识符剂量没有在其中定义。
外观已从iOS 7中移除。还有其他方式吗?
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?
推荐答案
您无法获取 CBPeripheral
但您可以获取标识符
属性,这是iOS在其他信息中从MAC计算的UUID。
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.
此值可以安全地存储,并用于在将来的特定iOS设备上识别相同的外围设备。
This value can be safely stored and used to identify the same peripheral in the future on this particular iOS device.
不能在其他iOS设备上使用它来识别相同的外围设备。
It cannot be used on another iOS device to identify the same peripheral.
这篇关于如何从CBPeripheral和CBCenter获取Mac地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!