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) {