如何从CBPeripheral和CBCenter获取Mac地址 [英] How to get Mac Address From CBPeripheral And CBCenter

查看:1015
本文介绍了如何从CBPeripheral和CBCenter获取Mac地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从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?

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

推荐答案

您无法获取 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆