BarcodeScannerDelegate
@MainActor
public protocol BarcodeScannerDelegate : AnyObject
A delegate protocol for receiving updates from a BarcodeScanner instance.
-
Called when the status of the barcode scanner changes.
Declaration
Swift
@MainActor func barcodeScannerDidUpdateStatus(_ status: ScannerStatus, for sender: any BarcodeScanner)Parameters
statusThe new
ScannerStatus.senderThe
BarcodeScannerinstance that reported the status change. -
Called when a barcode is successfully scanned and decoded.
Declaration
Swift
@MainActor func barcodeScannerDidReceiveBarcode(_ barcode: String, from sender: any BarcodeScanner)Parameters
barcodeThe string representation of the scanned barcode data.
senderThe
BarcodeScannerinstance that scanned the barcode.