munim-bluetooth 0.3.25 → 0.3.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -786,12 +786,13 @@ class HybridMunimBluetooth: HybridMunimBluetoothSpec {
786
786
 
787
787
  func handlePeripheralDidUpdateValue(_ peripheral: CBPeripheral, characteristic: CBCharacteristic, error: Error?) {
788
788
  let deviceId = peripheral.identifier.uuidString
789
+ let serviceUUID = characteristic.service?.uuid.uuidString ?? ""
789
790
 
790
791
  if let error = error {
791
792
  pendingReadPromises.removeValue(
792
793
  forKey: characteristicKey(
793
794
  deviceId: deviceId,
794
- serviceUUID: characteristic.service.uuid.uuidString,
795
+ serviceUUID: serviceUUID,
795
796
  characteristicUUID: characteristic.uuid.uuidString
796
797
  )
797
798
  )?.reject(withError: error)
@@ -804,13 +805,13 @@ class HybridMunimBluetooth: HybridMunimBluetoothSpec {
804
805
  pendingReadPromises.removeValue(
805
806
  forKey: characteristicKey(
806
807
  deviceId: deviceId,
807
- serviceUUID: characteristic.service.uuid.uuidString,
808
+ serviceUUID: serviceUUID,
808
809
  characteristicUUID: characteristic.uuid.uuidString
809
810
  )
810
811
  )?.resolve(
811
812
  withResult: CharacteristicValue(
812
813
  value: hexString,
813
- serviceUUID: characteristic.service.uuid.uuidString,
814
+ serviceUUID: serviceUUID,
814
815
  characteristicUUID: characteristic.uuid.uuidString
815
816
  )
816
817
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "munim-bluetooth",
3
- "version": "0.3.25",
3
+ "version": "0.3.26",
4
4
  "description": "A comprehensive React Native library for all your Bluetooth Low Energy (BLE) needs, supporting both peripheral and central roles with Expo support",
5
5
  "main": "./lib/commonjs/index.js",
6
6
  "module": "./lib/module/index.js",