iOS UUID 已弃用 corebluetooth

标签 ios uuid core-bluetooth deprecation-warning

我正在修改一个通过蓝牙 BLE 发现设备的应用程序,以便将值绘制成图表。一切正常(感谢你们中的一个人在过去一周的帮助)。该应用程序最初是由我丈夫不久前编写的,在发现该设备期间,他使用的检查代码如下:

NSLog(@" Failed to Connect to Peripheral : %@   with UUID: %@   ", peripheral, peripheral.UUID);

NSLog(@" Connected to Peripheral : %@   with UUID: %@   ", peripheral, peripheral.UUID);

在每一行(以及更多行)的前面,我收到 UUID 已弃用的警告消息:first deprecated in ios 7.0 很长一段时间以来,我试图找出它被替换的东西,但在谷歌上,它看起来不像其他人有同样的问题,当我去苹果文档时:here

没有提到它被弃用。

我不明白...

有人可以帮忙吗?谢谢

编辑:添加一些信息

这是我在电脑上的控制台上得到的

enter image description here

最佳答案

更新

我仔细检查过,CBPeer 上的 UUID 属性也已弃用。

我从 Xcode 的文档中找到 -

Deprecation Statement
Use the identifier property instead.

如果您使用 peripheral.identifier.UUIDString,您不会收到弃用警告。

关于iOS UUID 已弃用 corebluetooth,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26279723/

相关文章:

ios - IOSurface 操作什么时候需要 IOSurfaceLock?

ios - Tiled - 支持不同的ios设备

url - UUID 和搜索引擎友好的 URL

android - java.io.IOException : Service discovery failed

ios - 关闭然后打开后如何在后台重新连接BLE设备?

iOS 设备与蓝牙设备的通信

swift - 在 ios 8 中使用蓝牙发送到外设的数据量

ios - 如何在TableView外侧实现iPad中的复选标记按钮

objective-c - 在连续的内存块中分配objective-c对象

sparql - 在 rdf 中使用 urn 命名空间的最佳实践