iOS Xcode如何获取蓝牙设备的唯一ID

时间:2018-10-09 09:56:25

标签: ios xcode bluetooth core-bluetooth ios-bluetooth

我正在使用CoreBluetooth,并且想要获取蓝牙设备的唯一ID。 现在面临以下方法的问题-

- (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI{
    NSLog(@"%@",peripheral.identifier.UUIDString]);
}

peripheral.identifier.UUIDString 始终为不同的iPhone设备返回不同的蓝牙设备的UUID。

0 个答案:

没有答案
相关问题