ScanCriteria

public struct ScanCriteria

This is the struct that we use to narrow the search criteria for new instances of the CGA_Bluetooth_CentralManager class.

If you will not be looking for particular Bluetooth instances, then leave the corresponding property nil, or empty.

All members are String, but these will be converted internally into CBUUIDs.

These are applied across the board. For example, if you specify a Service, then ALL scans will filter for that Service, and if you specify a Characteristic, then ALL Services, for ALL peripherals, will be scanned for that Characteristic.

  • This is a list of identifier UUIDs for specific Bluetooth devices.

    Declaration

    Swift

    public let peripherals: [String]?
  • This is a list of UUIDs for Services that will be scanned.

    Declaration

    Swift

    public let services: [String]?
  • This is a list of UUIDs for specific Characteristics to be discovered within Services.

    Declaration

    Swift

    public let characteristics: [String]?
  • This returns true, if all of the specifiers are nil or empty.

    Declaration

    Swift

    public var isEmpty: Bool { get }
  • Standard initializer

    Declaration

    Swift

    public init(peripherals inPeripherals: [String]?, services inServices: [String]?, characteristics inCharacteristics: [String]?)

    Parameters

    peripherals

    This is a list of identifier UUIDs for specific Bluetooth devices.

    services

    This is a list of UUIDs for Advertised Services that will be scanned.

    characteristics

    This is a list of UUIDs for specific Characteristics to be discovered within Services.