diff --git a/src/platform/Darwin/BleConnectionDelegateImpl.mm b/src/platform/Darwin/BleConnectionDelegateImpl.mm index ad1093007473bb..39ca6f58657269 100644 --- a/src/platform/Darwin/BleConnectionDelegateImpl.mm +++ b/src/platform/Darwin/BleConnectionDelegateImpl.mm @@ -698,7 +698,7 @@ - (void)removePeripheralFromCache:(CBPeripheral *)peripheral - (void)removePeripheralsFromCache { - for (CBPeripheral * peripheral in [_cachedPeripherals allValues]) { + for (CBPeripheral * peripheral in [_cachedPeripherals allKeys]) { [self removePeripheralFromCache:peripheral]; } }