We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
AndroidCentral.peripherals
1 parent 059fb68 commit 80ded19Copy full SHA for 80ded19
1 file changed
Sources/AndroidBluetooth/AndroidCentral.swift
@@ -37,7 +37,14 @@ public final class AndroidCentral: CentralManager {
37
38
public var peripherals: [GATT.Peripheral : Bool] {
39
get async {
40
- [:] // FIXME:
+ await storage.update { state in
41
+ var peripherals = [GATT.Peripheral: Bool]()
42
+ peripherals.reserveCapacity(state.scan.peripherals.count)
43
+ for peripheral in state.scan.peripherals.keys {
44
+ peripherals[peripheral] = state.cache[peripheral] != nil
45
+ }
46
+ return peripherals
47
48
}
49
50
0 commit comments