evothings / cordova-ble

Bluetooth Low Energy plugin for Cordova
http://www.evothings.com/
Apache License 2.0
242 stars 103 forks source link

iOS: peripheral.RSSI is deprecated #98

Open ghost opened 8 years ago

ghost commented 8 years ago

On iOS, peripheral.RSSI has been deprecated.

Updated file EVOBLE.m to use peripheral:didReadRSSI:error: instead.

scottmahr commented 8 years ago

Is this actually fixed? I looked through EVOBLE.m but couldn't figure out if it had been changed or not.

ghost commented 8 years ago

This has not been updated yet. peripheral.RSSI is still used on line 489 in EVOBLE.m

Thanks for reminding!

scottmahr commented 8 years ago

Does that mean that it will be fixed? Or is there a way I can fix it myself?

On Wed, Jul 6, 2016 at 1:29 AM, Mikael Kindborg notifications@github.com wrote:

I had a look and this has not been updated. peripheral.RSSI is used on line 489 in EVOBLE.m

Thanks for noticing!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/evothings/cordova-ble/issues/98#issuecomment-230710327, or mute the thread https://github.com/notifications/unsubscribe/AITGOknp96UwgDxfaVMkTmUgfVJ5rHW1ks5qS2dggaJpZM4IRxsG .

ghost commented 8 years ago

@scottmahr You don't have to fix it, it should work even though it is deprecated (or does it not work?). Will look into updating this when working on a new release of the BLE plugin for iOS.

scottmahr commented 8 years ago

Yep, still works just fine. Thanks!

On Thu, Jul 7, 2016 at 10:02 AM, Mikael Kindborg notifications@github.com wrote:

@scottmahr https://github.com/scottmahr You don't have to fix it, it should work even though it is deprecated (or does it not work?). Will look into updating this when working on a new release of the BLE plugin for iOS.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/evothings/cordova-ble/issues/98#issuecomment-231142168, or mute the thread https://github.com/notifications/unsubscribe/AITGOnVTV9zKMJx8kKfAfMByr8td6J66ks5qTTESgaJpZM4IRxsG .

mdailor commented 7 years ago

On iOS 10, when I try to read the RSSI of a scanned device:

evothings.ble.rssi( device, function (rssi) { console.log("RSSI=" + rssi }, function (err) { console.log("ERROR=" + err });

I get the following error:

[NSTaggedPointerString count]: unrecognized selector sent to instance 0xa000000697373724 *** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: [NSTaggedPointerString count]: unrecognized selector sent to instance 0xa000000697373724

Is there a alternate method for reading the RSSI value? Thanks!

tozymandias commented 7 years ago

@mdailor

I am getting the exact same problem...in fact my app sometimes crashes due to this. any luck fixing the problem?