BluetoothCollector
public class BluetoothCollector : DeviceCollector, @unchecked Sendable
Collector for Bluetooth Low Energy (BLE) capability information.
This collector determines whether the device supports Bluetooth Low Energy by checking the CoreBluetooth framework’s central manager state. It provides information about BLE support without requiring location permissions.
-
Declaration
Swift
public typealias DataType = BluetoothInfo -
Unique identifier for bluetooth capability data
Declaration
Swift
public let key: String -
collect()AsynchronousCollects Bluetooth capability information
Declaration
Swift
public func collect() async -> BluetoothInfo?Return Value
BluetoothInfo containing support status
-
Initializes a new instance with optional state provider (for testing)
Declaration
Swift
public init(stateProvider: BluetoothStateProvider? = nil)Parameters
stateProviderCustom state provider. If nil, uses real CoreBluetooth implementation
View on GitHub