diff --git a/CHANGELOG.md b/CHANGELOG.md index 791d9984..0271be9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 4.4.3 - 2017-11-08 +- Use didReadRSSI + ## 4.4.2 - 2017-07-04 - Allow Windows scanning to be restarted [\#438](https://github.com/randdusing/cordova-plugin-bluetoothle/pull/438) diff --git a/package.json b/package.json index 8239df4b..83d695b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-bluetoothle", - "version": "4.4.2", + "version": "4.4.3", "description": "Use the Bluetooth Low Energy plugin to connect your Cordova app to new Bluetooth devices like heart rate monitors, thermometers, etc...", "types": "./types/index.d.ts", "cordova": { diff --git a/plugin.xml b/plugin.xml index 175eee83..47d7cdd0 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,5 +1,5 @@ - + diff --git a/src/ios/BluetoothLePlugin.m b/src/ios/BluetoothLePlugin.m index 82fdd4dc..2f6e4441 100644 --- a/src/ios/BluetoothLePlugin.m +++ b/src/ios/BluetoothLePlugin.m @@ -2822,7 +2822,7 @@ - (void)peripheral:(CBPeripheral *)peripheral didUpdateNotificationStateForChara } } -- (void)peripheralDidUpdateRSSI:(CBPeripheral *)peripheral error:(NSError *)error { +- (void) peripheral:(CBPeripheral *)peripheral didReadRSSI:(NSNumber *)RSSI error:(NSError *)error { //Get connection NSMutableDictionary* connection = [connections objectForKey:peripheral.identifier]; if (connection == nil) { @@ -2855,7 +2855,7 @@ - (void)peripheralDidUpdateRSSI:(CBPeripheral *)peripheral error:(NSError *)erro } //Return RSSI value - [returnObj setValue:peripheral.RSSI forKey:keyRssi]; + [returnObj setValue:RSSI forKey:keyRssi]; [returnObj setValue:statusRssi forKey:keyStatus]; CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:returnObj]; diff --git a/src/osx/BluetoothLePlugin.m b/src/osx/BluetoothLePlugin.m index 5af700d3..890247ca 100644 --- a/src/osx/BluetoothLePlugin.m +++ b/src/osx/BluetoothLePlugin.m @@ -2822,7 +2822,7 @@ - (void)peripheral:(CBPeripheral *)peripheral didUpdateNotificationStateForChara } } -- (void)peripheralDidUpdateRSSI:(CBPeripheral *)peripheral error:(NSError *)error { +- (void) peripheral:(CBPeripheral *)peripheral didReadRSSI:(NSNumber *)RSSI error:(NSError *)error { //Get connection NSMutableDictionary* connection = [connections objectForKey:peripheral.identifier]; if (connection == nil) { @@ -2855,7 +2855,7 @@ - (void)peripheralDidUpdateRSSI:(CBPeripheral *)peripheral error:(NSError *)erro } //Return RSSI value - [returnObj setValue:peripheral.RSSI forKey:keyRssi]; + [returnObj setValue:RSSI forKey:keyRssi]; [returnObj setValue:statusRssi forKey:keyStatus]; CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:returnObj];