PolarBleApiObserver

public protocol PolarBleApiObserver : AnyObject

Polar Ble API connection observer.

  • Callback when connection attempt is started to device

    Declaration

    Swift

    func deviceConnecting(_ identifier: PolarDeviceInfo)

    Parameters

    identifier

    Polar device info

  • Device connnection has been established.

    Declaration

    Swift

    func deviceConnected(_ identifier: PolarDeviceInfo)

    Parameters

    identifier

    Polar device info

  • Connection lost to device. If PolarBleApi#disconnectFromPolarDevice is not called, a new connection attempt is dispatched automatically.

    Declaration

    Swift

    func deviceDisconnected(_ identifier: PolarDeviceInfo, pairingError: Bool)

    Parameters

    identifier

    Polar device info

    pairingError

    If true, it indicates that the disconnection was caused by a pairing error. In this case, try removing the pairing from the system settings.