Skip to main content

QRScannerHelper

public class QRScannerHelper

  • This is the helper class that provides QR scanning functionality.

Constructor​

public init(bidScannerView: BIDScannerView, kQRScanResponseDelegate: QRScanResponseDelegate)

  • Creates an object of QRScannerHelper.
Parameters
bidScannerViewBIDScannerViewAn object of BIDScannerView.
kQRScanResponseDelegateQRScanResponseDelegateThe block to execute after the response is received.

Method Summary​

Parameters
BoolisRunning()Indicates if the QR scanner is running or not.
voidstartQRScanning()Starts the QR scanner.
voidstopQRScanning()Stops the QR scanner.

Method Detail​

isRunning​

public func isRunning() -> Bool

  • Indicates if the QR scanner is running or not.

startQRScanning​

public func startQRScanning()

  • Starts the QR scanner.

stopQRScanning​

public func stopQRScanning()

  • Stops the QR scanner.

Protocol Summary​

ProtocalDescription
QRScanResponseDelegateCallback for the event when QR scanning is completed.

QRScanResponseDelegate​

public protocol QRScanResponseDelegate: AnyObject

  • Callback for the event when QR scanning is completed.

Method Summary​

func onQRScanResult(qrCodeData: String?)

  • Called when QR scanning is completed.
ParameterTypeDescription
qrCodeDataStringReturns the QR code data after the scanning is completed.