ReaderEvents

public protocol ReaderEvents : AnyObject

Protocol used to receive smart card reader events.

Note

Due to iOS limitation, NFC reader events are not reported as other reader types:
  • Called when a new reader is plugged in the device. This include supported lightning readers and bluetooth device.

    Declaration

    Swift

    func onReaderAdded(reader: Reader)

    Parameters

    reader

    The Reader that was just added.

  • Called when the state of a reader changes (e.g insertion or withdrawal of a card…).

    Declaration

    Swift

    func onReaderStateChanged(reader: Reader)

    Parameters

    reader

    The affected Reader object. Its properties can be consulted (e.g using Reader.getStatus(), Reader.isCardPresent()…) to obtain more information about the event.

  • Called when a reader is unplugged from the device.

    Declaration

    Swift

    func onReaderRemoved(reader: Reader)

    Parameters

    reader

    The removed Reader object.