iOS 8 CoreBluetooth不推荐使用RSSI方法 [英] iOS 8 CoreBluetooth deprecated RSSI methods

查看:635
本文介绍了iOS 8 CoreBluetooth不推荐使用RSSI方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,通过阅读 CBPeripheralDelegate 文档,似乎 RSSI peripheralDidUpdateRSSI:错误:已被iOS 8弃用。

So from reading the CBPeripheralDelegate documentation, it appears that RSSI and peripheralDidUpdateRSSI:error: were deprecated with iOS 8.

我注意到我的信号强度指示器不再更新,所以我做了一些研究并发现了新方法( [CBPeripheralDelegate peripheral:didReadRSSI:error:] )在调用 readRSSI 方法之后可能异步调用。不幸的是,即使我确实将父类设置为CBPeripheral委托,这个方法似乎也没有被回调。

I noticed that my signal strength indicator was no longer being updated, so I did some research and found a new method ([CBPeripheralDelegate peripheral:didReadRSSI:error:]) that supposedly get called back asynchronously after calling the readRSSI method. Unfortunately, this method does not seem to get called back either, even though I did set the parent class as the CBPeripheral delegate.

还有其他人遇到iOS 8 CoreBluetooth更新问题吗?

Has anyone else had issues with the iOS 8 CoreBluetooth updates?

推荐答案

在Apple开发者论坛上已经发布了一个已知问题,我也有一个开放的雷达。

There is a known issue that has been posted about this on the Apple Developer forums to which I have an open radar as well.

问题似乎是初始连接到外围设备后,在iOS 8上永远不会调用新的回调方法 peripheral:didReadRSSI:error:。我发现的唯一解决方案是通过打开/关闭手机或重新启动手机来重置手机上的蓝牙。

The issue seems to be that the new callback method peripheral:didReadRSSI:error: is never called on iOS 8 specifically after the initial connection is made to a peripheral. The only resolution I have found is to reset bluetooth on your phone by turning it on/off or restarting the phone.

这是打开雷达I的链接提交。

刚刚测试了我的示例8.2发布,我不再看到从未被调用的新iOS 8委托方法的任何问题。我按照8.2版本标记了我的雷达。

Just tested my example that was displaying this issue with the current 8.2 release and I am no longer seeing any issues with the new iOS 8 delegate method never being called. I am marking my radar as resolved per the 8.2 release.

这篇关于iOS 8 CoreBluetooth不推荐使用RSSI方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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