我正在尝试将CBPeripheral的UUID转换为字符串格式:
CBPeripheral* peripheral;
NSString *pUuid = (__bridge NSString *)(CFUUIDCreateString(nil, peripheral.UUID));
但我收到了这个错误:
Incompatible pointer types passing retainable parameter of type 'NSString *' to a CF functions expecting 'CFUUIDRef' (aka 'const struct _CFUUID *') type
答案 0 :(得分:2)
peripheral.UUID
自OSX 10.9起不推荐使用
要完成您要执行的操作,请使用:
[peripheral.identifier UUIDString]