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:SCMEnvironment.initTagReaderSession(message:completionHandler:)must be called before detecting NFC tags.- Once a tag reader session is started, only the detection of a card is possible through
ReaderEvents.onReaderStateChanged(reader:), not its removal.
-
Called when the state of a reader changes (e.g insertion or withdrawal of a card…).
Declaration
Swift
func onReaderStateChanged(reader: Reader)Parameters
readerThe affected
Readerobject. Its properties can be consulted (e.g usingReader.getStatus(),Reader.isCardPresent()…) to obtain more information about the event.