Barcode Selection Listener

Defined in framework ScanditBarcodeCapture

BarcodeSelectionListener
protocol BarcodeSelectionListener : NSObjectProtocol

Added in version 6.6.0

The BarcodeSelection listener is the main way for hooking into BarcodeSelection. It provides a callback that is invoked when the state of selected barcodes changes.

didStartObserving
optional func didStartObserving(_ barcodeSelection: BarcodeSelection) -> Void

Added in version 6.6.0

Called when the listener starts observing the BarcodeSelection instance.

didStopObserving
optional func didStopObserving(_ barcodeSelection: BarcodeSelection) -> Void

Added in version 6.6.0

Called when the listener stops observing the BarcodeSelection instance.

barcodeSelection
open func barcodeSelection(_ barcodeSelection: BarcodeSelection, didUpdateSelection session: BarcodeSelectionSession, frameData: (any FrameData)?) -> Void

Added in version 6.6.0

Invoked whenever a barcode is selected or a previously selected barcode is unselected.

FrameData is null if the camera is frozen and the selection is changed.

barcodeSelection
optional func barcodeSelection(_ barcodeSelection: BarcodeSelection, didUpdate session: BarcodeSelectionSession, frameData: (any FrameData)?) -> Void

Added in version 6.6.0

Invoked after a frame has been processed by barcode selection and the session has been updated. In contrast to barcodeSelection(), this method is invoked, regardless whether a code was selected or not.

FrameData is null if the camera is frozen and the selection is changed.