From 811b212782b9acbb1318edbbdc2c2fdcc00d2c49 Mon Sep 17 00:00:00 2001 From: Philip Peitsch Date: Sat, 26 Oct 2024 09:30:51 +1100 Subject: [PATCH] Fix compilation issue --- src/ios/BLECentralPlugin.h | 2 +- src/ios/BLECentralPlugin.m | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ios/BLECentralPlugin.h b/src/ios/BLECentralPlugin.h index e1223dbf..9b03d0d6 100644 --- a/src/ios/BLECentralPlugin.h +++ b/src/ios/BLECentralPlugin.h @@ -41,7 +41,7 @@ NSTimer *scanTimer; } -@property (strong, nonatomic) NSMutableSet *peripherals; +@property (strong, nonatomic) NSMutableDictionary *peripherals; @property (strong, nonatomic) CBCentralManager *manager; - (void)startScanWithOptions:(CDVInvokedUrlCommand *)command; diff --git a/src/ios/BLECentralPlugin.m b/src/ios/BLECentralPlugin.m index dea00cd4..41ec3b2d 100644 --- a/src/ios/BLECentralPlugin.m +++ b/src/ios/BLECentralPlugin.m @@ -677,7 +677,7 @@ -(void)stopScanTimer:(NSTimer *)timer { - (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI { - [peripherals setbject:peripheral forKey:peripheral.identifier]; + [peripherals setObject:peripheral forKey:peripheral.identifier]; [peripheral setAdvertisementData:advertisementData RSSI:RSSI]; if (discoverPeripheralCallbackId) { @@ -820,7 +820,7 @@ - (void)peripheral:(CBPeripheral *)peripheral didDiscoverCharacteristicsForServi [self.commandDelegate sendPluginResult:pluginResult callbackId:connectCallbackId]; } return; - } + } NSLog(@"Found characteristics for service %@", service); for (CBCharacteristic *characteristic in service.characteristics) {