BKClientDiscoveryDelegate

public protocol BKClientDiscoveryDelegate

Delegate for the BLE discovery.

Discovery delegates are registred by BKClient.discoveryDelegate

  • Will be called when the BKDeviceDiscoveryService is initialized

    Declaration

    Swift

    func onDiscoveryInitialized()
  • Will be called frequently after one scan duration for returning the scan results.

    If no BLE modules has been found discoveryResult list is an empty list (not nil).

    If BKResolveSettings.resolceEnabled is true but the blukii Info Manager is not accessible this delegate will be called anyway with a discovery result BKOutputElement list but without BKResolveData objects. In this case onDiscoveryError(errorCode: BKClient.ErrorCode) will be called additionally

    If the discovery failed because of an error onDiscoveryResult(discoveryResultList: [BKOutputElement]) will not be called.

    Declaration

    Swift

    func onDiscoveryResult(_ discoveryResultList: [BKOutputElement])

    Parameters

    discoveryResultList

    list of discovered BKOutputElements

  • Will be called if discovery or resolver fail because of an error

    Declaration

    Swift

    func onDiscoveryError(_ errorCode: BKClient.ErrorCode)

    Parameters

    errorCode

    error code

  • Will be called for discovery state information

    Declaration

    Swift

    func onDiscoveryInfo(_ infoCode: BKClient.InfoCode)

    Parameters

    infoCode

    info code