File tree Expand file tree Collapse file tree
Sources/CombineCoreBluetooth/CentralManager Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,12 +11,6 @@ extension CentralManager {
1111 options: options? . centralManagerDictionary
1212 )
1313
14- #if os(macOS) && !targetEnvironment(macCatalyst)
15- @Sendable func supportsFeatures< A> ( _ feature: Never ) -> A { }
16- #else
17- let supportsFeatures : @Sendable ( _ features: CBCentralManager . Feature ) -> Bool = { CBCentralManager . supports ( $0) }
18- #endif
19-
2014 return Self . init (
2115 delegate: delegate,
2216 _state: { centralManager. state } ,
@@ -28,7 +22,13 @@ extension CentralManager {
2822 }
2923 } ,
3024 _isScanning: { centralManager. isScanning } ,
31- _supportsFeatures: supportsFeatures,
25+ _supportsFeatures: {
26+ #if os(macOS) && !targetEnvironment(macCatalyst)
27+ // will never be called on native macOS
28+ #else
29+ CBCentralManager . supports ( $0)
30+ #endif
31+ } ,
3232 _retrievePeripheralsWithIdentifiers: { ( identifiers) -> [ Peripheral ] in
3333 centralManager. retrievePeripherals ( withIdentifiers: identifiers) . map ( Peripheral . init ( cbperipheral: ) )
3434 } ,
You can’t perform that action at this time.
0 commit comments