Protocols

The following protocols are available globally.

BluetoothStateProvider Protocol

  • Protocol for providing Bluetooth state detection (allows for mocking)

    See more

    Declaration

    Swift

    public protocol BluetoothStateProvider : Sendable

DeviceCollector Protocol

  • Protocol for device collectors that gather specific types of device information.

    Device collectors are responsible for collecting specific categories of device data such as platform information, hardware specifications, network status, etc. Each collector returns a specific data type and has a unique key identifier.

    Example usage:

    let platformCollector = PlatformCollector()
    let platformInfo = try await platformCollector.collect()
    print("Collector key: \(platformCollector.key)")
    
    See more

    Declaration

    Swift

    public protocol DeviceCollector