react-native-ble-manager 11.5.4 → 11.5.6
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.
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
|
-
package="it.innove"
|
|
2
|
+
package="it.innove"
|
|
3
|
+
xmlns:tools="http://schemas.android.com/tools">
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
|
6
|
+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
|
7
|
+
<uses-permission
|
|
8
|
+
android:name="android.permission.BLUETOOTH"
|
|
9
|
+
android:maxSdkVersion="30" />
|
|
10
|
+
<uses-permission
|
|
11
|
+
android:name="android.permission.BLUETOOTH_ADMIN"
|
|
12
|
+
android:maxSdkVersion="30" />
|
|
13
|
+
<uses-permission
|
|
14
|
+
android:name="android.permission.BLUETOOTH_SCAN"
|
|
15
|
+
android:usesPermissionFlags="neverForLocation"
|
|
16
|
+
tools:targetApi="s" />
|
|
17
|
+
<uses-permission
|
|
18
|
+
android:name="android.permission.BLUETOOTH_CONNECT"
|
|
19
|
+
tools:targetApi="s" />
|
|
11
20
|
</manifest>
|
package/ios/BleManager.swift
CHANGED
|
@@ -1025,7 +1025,7 @@ class BleManager: RCTEventEmitter, CBCentralManagerDelegate, CBPeripheralDelegat
|
|
|
1025
1025
|
|
|
1026
1026
|
if let error = error {
|
|
1027
1027
|
NSLog("Error reading descriptor value for \(descriptor.uuid) on characteristic \(descriptor.characteristic!.uuid) :\(error)")
|
|
1028
|
-
invokeAndClearDictionary(&readDescriptorCallbacks, withKey: key, usingParameters: [error, NSNull()])
|
|
1028
|
+
invokeAndClearDictionary(&readDescriptorCallbacks, withKey: key, usingParameters: [error.localizedDescription, NSNull()])
|
|
1029
1029
|
return
|
|
1030
1030
|
}
|
|
1031
1031
|
|
|
@@ -1073,7 +1073,7 @@ class BleManager: RCTEventEmitter, CBCentralManagerDelegate, CBPeripheralDelegat
|
|
|
1073
1073
|
|
|
1074
1074
|
if let error = error {
|
|
1075
1075
|
NSLog("Error \(characteristic.uuid) :\(error)")
|
|
1076
|
-
invokeAndClearDictionary(&readCallbacks, withKey: key, usingParameters: [error, NSNull()])
|
|
1076
|
+
invokeAndClearDictionary(&readCallbacks, withKey: key, usingParameters: [error.localizedDescription, NSNull()])
|
|
1077
1077
|
return
|
|
1078
1078
|
}
|
|
1079
1079
|
|
package/ios/Helper.swift
CHANGED
|
@@ -165,13 +165,13 @@ class Helper {
|
|
|
165
165
|
|
|
166
166
|
static func key(forPeripheral peripheral: CBPeripheral,
|
|
167
167
|
andCharacteristic characteristic: CBCharacteristic) -> String {
|
|
168
|
-
return "\(String(describing: peripheral.uuidAsString))|\(characteristic.uuid)"
|
|
168
|
+
return "\(String(describing: peripheral.uuidAsString()))|\(characteristic.uuid)"
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
static func key(forPeripheral peripheral: CBPeripheral,
|
|
172
172
|
andCharacteristic characteristic: CBCharacteristic,
|
|
173
173
|
andDescriptor descriptor: CBDescriptor) -> String {
|
|
174
|
-
return "\(String(describing: peripheral.uuidAsString))|\(characteristic.uuid)|\(descriptor.uuid)"
|
|
174
|
+
return "\(String(describing: peripheral.uuidAsString()))|\(characteristic.uuid)|\(descriptor.uuid)"
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
static func findDescriptor(fromUUID UUID: CBUUID, characteristic: CBCharacteristic) -> CBDescriptor? {
|