@capgo/capacitor-bluetooth-low-energy 1.1.3 → 1.1.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.
@@ -68,7 +68,7 @@ import java.util.UUID;
68
68
  )
69
69
  public class BluetoothLowEnergyPlugin extends Plugin {
70
70
 
71
- private final String pluginVersion = "1.1.3";
71
+ private final String pluginVersion = "1.1.6";
72
72
  private BluetoothManager bluetoothManager;
73
73
  private BluetoothAdapter bluetoothAdapter;
74
74
  private BluetoothLeScanner bluetoothLeScanner;
@@ -252,7 +252,7 @@ public class BluetoothLowEnergyPlugin extends Plugin {
252
252
  ScanSettings.Builder settingsBuilder = new ScanSettings.Builder()
253
253
  .setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY);
254
254
 
255
- if (!allowDuplicates && Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
255
+ if (!allowDuplicates) {
256
256
  settingsBuilder.setCallbackType(ScanSettings.CALLBACK_TYPE_FIRST_MATCH);
257
257
  }
258
258
 
@@ -61,21 +61,17 @@ public class BluetoothLowEnergy: NSObject {
61
61
  }
62
62
 
63
63
  func getPermissionStatus() -> String {
64
- if #available(iOS 13.1, *) {
65
- switch CBCentralManager.authorization {
66
- case .allowedAlways:
67
- return "granted"
68
- case .denied:
69
- return "denied"
70
- case .restricted:
71
- return "denied"
72
- case .notDetermined:
73
- return "prompt"
74
- @unknown default:
75
- return "prompt"
76
- }
77
- } else {
64
+ switch CBCentralManager.authorization {
65
+ case .allowedAlways:
78
66
  return "granted"
67
+ case .denied:
68
+ return "denied"
69
+ case .restricted:
70
+ return "denied"
71
+ case .notDetermined:
72
+ return "prompt"
73
+ @unknown default:
74
+ return "prompt"
79
75
  }
80
76
  }
81
77
 
@@ -5,7 +5,7 @@ import CoreBluetooth
5
5
  // swiftlint:disable type_body_length file_length
6
6
  @objc(BluetoothLowEnergyPlugin)
7
7
  public class BluetoothLowEnergyPlugin: CAPPlugin, CAPBridgedPlugin {
8
- private let pluginVersion: String = "1.1.3"
8
+ private let pluginVersion: String = "1.1.6"
9
9
  public let identifier = "BluetoothLowEnergyPlugin"
10
10
  public let jsName = "BluetoothLowEnergy"
11
11
  public let pluginMethods: [CAPPluginMethod] = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-bluetooth-low-energy",
3
- "version": "1.1.3",
3
+ "version": "1.1.6",
4
4
  "description": "Bluetooth Low Energy (BLE) plugin for Capacitor with support for scanning, connecting, reading, writing, and notifications.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",