munim-bluetooth 0.3.6 → 0.3.8
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.
|
@@ -10,7 +10,7 @@ import CoreBluetooth
|
|
|
10
10
|
import NitroModules
|
|
11
11
|
import React
|
|
12
12
|
|
|
13
|
-
class HybridMunimBluetooth:
|
|
13
|
+
class HybridMunimBluetooth: HybridMunimBluetoothSpec {
|
|
14
14
|
// Peripheral Manager
|
|
15
15
|
private var peripheralManager: CBPeripheralManager?
|
|
16
16
|
private var peripheralServices: [CBMutableService] = []
|
|
@@ -306,7 +306,7 @@ class HybridMunimBluetooth: NSObject, HybridMunimBluetoothSpec, CBPeripheralMana
|
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
// MARK: - CBPeripheralManagerDelegate Implementation
|
|
309
|
-
extension HybridMunimBluetooth {
|
|
309
|
+
extension HybridMunimBluetooth: CBPeripheralManagerDelegate {
|
|
310
310
|
func peripheralManagerDidUpdateState(_ peripheral: CBPeripheralManager) {
|
|
311
311
|
// Handle state updates
|
|
312
312
|
}
|
|
@@ -329,7 +329,7 @@ extension HybridMunimBluetooth {
|
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
// MARK: - CBCentralManagerDelegate Implementation
|
|
332
|
-
extension HybridMunimBluetooth {
|
|
332
|
+
extension HybridMunimBluetooth: CBCentralManagerDelegate {
|
|
333
333
|
func centralManagerDidUpdateState(_ central: CBCentralManager) {
|
|
334
334
|
let state = central.state
|
|
335
335
|
eventEmitter?.emit("bluetoothStateChanged", ["state": state.rawValue])
|
|
@@ -372,7 +372,7 @@ extension HybridMunimBluetooth {
|
|
|
372
372
|
}
|
|
373
373
|
|
|
374
374
|
// MARK: - CBPeripheralDelegate Implementation
|
|
375
|
-
extension HybridMunimBluetooth {
|
|
375
|
+
extension HybridMunimBluetooth: CBPeripheralDelegate {
|
|
376
376
|
func peripheral(_ peripheral: CBPeripheral, didDiscoverServices error: Error?) {
|
|
377
377
|
let deviceId = peripheral.identifier.uuidString
|
|
378
378
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "munim-bluetooth",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
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",
|