iOS 8 CoreBluetooth deprecated RSSI methods

前端 未结 4 1237
天命终不由人
天命终不由人 2020-12-31 17:31

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

相关标签:
4条回答
  • 2020-12-31 17:33

    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.

    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.

    Here is the link to open radar I filed.

    UPDATE:

    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.

    0 讨论(0)
  • 2020-12-31 17:41

    In iOS 8.1.1, peripheral:didReadRSSI:error: will only get called for peripherals that you are connected to. If you've merely discovered the peripherals with a scan and then called readRSSI on them, the callback will not be called.

    Try connecting to the peripheral first (via CBCentralManager's connectPeripheral:options:), and then calling readRSSI.

    0 讨论(0)
  • 2020-12-31 17:45

    It works again in iOS 8.0.2!

    use [myPeripheral readRSSI];

    0 讨论(0)
  • It works iOS 8.0.2, but it is throttled now. I send a readRSSI every 200ms and get a response only once a second. It worked fine with iOS 7.1.

    0 讨论(0)
提交回复
热议问题