QrScannerView

@available(iOS 16.0, *)
struct QrScannerView : View
extension QrScannerView: QrBytesListener

A view for scanning QR codes. This view is responsible for scanning QR codes using the device’s camera. It manages various states and properties related to the scanning process, such as the camera manager, presentation mode, error handling, password input, and zoom level.

  • A camera manager instance to manage the camera.

    Declaration

    Swift

    @StateObject
    private var cameraManager: CameraManager { get }
  • Bool value to show preScanningScreenPassiveFaceCapture for passive face capture.

    Declaration

    Swift

    @State
    var isPresentedPreScanningScreenPassiveFaceCapture: Bool { get nonmutating set }
  • Bool value to show preScanningForActiveFaceCapture for active face capture.

    Declaration

    Swift

    @State
    var isPresentedPreScanningForActiveFaceCapture: Bool { get nonmutating set }
  • Bool value to show clear screen.

    Declaration

    Swift

    @State
    var isPresentedClearSceen: Bool { get nonmutating set }
  • State property for instruction text.

    Declaration

    Swift

    @State
    var tvInstuction: String { get nonmutating set }
  • State property for showAlert.

    Declaration

    Swift

    @State
    private var showAlert: Bool { get nonmutating set }
  • State property for qrBytes.

    Declaration

    Swift

    @State
    var qrBytes: [UInt8] { get nonmutating set }
  • err

    State property for error.

    Declaration

    Swift

    @State
    var err: ErrorType? { get nonmutating set }
  • Binding property for path.

    Declaration

    Swift

    @Binding
    var path: Bool { get nonmutating set }
  • Environment property for presentation mode.

    Declaration

    Swift

    @Environment
    var presentationMode: Binding<PresentationMode> { get }
  • State property for clearData.

    Declaration

    Swift

    @State
    var clearData: [String : String] { get nonmutating set }
  • State property for isInvalidQrVisible.

    Declaration

    Swift

    @State
    var isInvalidQrVisible: Bool { get nonmutating set }
  • State property for isShownErrorDialog.

    Declaration

    Swift

    @State
    var isShownErrorDialog: Bool { get nonmutating set }
  • State property for showConfirmationDialogBox.

    Declaration

    Swift

    @State
    var showConfirmationDialogBox: Bool { get nonmutating set }
  • State property for isShownPassWordDialog.

    Declaration

    Swift

    @State
    var isShownPassWordDialog: Bool { get nonmutating set }
  • State property for isEmptyPasswordError.

    Declaration

    Swift

    @State
    var isEmptyPasswordError: Bool { get nonmutating set }
  • State property for isPasswordDialogError.

    Declaration

    Swift

    @State
    var isPasswordDialogError: Bool { get nonmutating set }
  • State property for dialogWithRetryButton.

    Declaration

    Swift

    @State
    var dialogWithRetryButton: Bool { get nonmutating set }
  • State property for password.

    Declaration

    Swift

    @State
    var password: String { get nonmutating set }
  • State property for isPinchShow.

    Declaration

    Swift

    @State
    var isPinchShow: Bool { get nonmutating set }
  • typeView: The type of view to be displayed.

    Declaration

    Swift

    var typeView: TypeView
  • Third-party lib for QR code reading.

    Declaration

    Swift

    let reader: QRReader
  • A boolean state variable to indicate if the view is currently loading.

    Declaration

    Swift

    @State
    var isLoading: Bool { get nonmutating set }
  • Current zoom vale for the camera

    Declaration

    Swift

    @State
    private var currentZoomFactor: CGFloat { get nonmutating set }
  • Selected image form the gallery.

    Declaration

    Swift

    @State
    private var selectedImages: [UIImage] { get nonmutating set }
  • Photo dic oicked form the gallery

    Declaration

    Swift

    @State
    private var selectedItems: [PhotosPickerItem] { get nonmutating set }
  • Declaration

    Swift

    var body: some View { get }
  • Verify the password is correct or not

    • password: The password to be verified

    Declaration

    Swift

    private func checkPassWord(password: String)
  • Check the camera permission.

    Declaration

    Swift

    func checkCameraPermission()
  • Navigate to clear data screen

    • data: The clear data information

    Declaration

    Swift

    func naviageToClearData(data: [String : String])
  • Navigate to the face capture screen.

    Declaration

    Swift

    func navigateToFaceCapture()
  • Check the SensePrint type

    • sensePrintInfo: The SensePrint information
    • QRBytes: The QR code bytes

    Declaration

    Swift

    func checkSensePrintType(sensePrintInfo: SensePrintInfo, qrBytes: [UInt8])
  • Executes the QR code scanning process and performs actions based on the typeView.

    • - Parameters:
    • - sensePrintInfo: The SensePrintInfo object containing information about the scanned QR code.
    • - qrBytes: The array of UInt8 representing the scanned QR code.

    Declaration

    Swift

    func execute(sensePrintInfo: SensePrintInfo, qrBytes: [UInt8])
  • Shows the password dialog.

    Declaration

    Swift

    func showPasswordDialog()
  • Shows the invalid QR code message.

    Declaration

    Swift

    func showInvalidQr()
  • Shows the “Cannot Connect to Home Server” message and sets the error details.

    Declaration

    Swift

    func showCannotConnectToHomeServer()
  • Shows the “Generation Exceeded” error message and sets the error details.

    Declaration

    Swift

    func ShowGenrationExceed()
  • Shows the “Verification Exceeded” error message and sets the error details.

    Declaration

    Swift

    func showVerificationExceed()
  • Shows the “Number of Available Instances Exceeded” error message and sets the error details.

    Declaration

    Swift

    func noOfAvlInstanceExceed()
  • Shows the “Signature Verification Failed” error message and sets the error details.

    Declaration

    Swift

    func showSignatureVerificationFailed()
  • Shows the “License Expired” error message and sets the error details.

    Declaration

    Swift

    func showLicenseExpired()
  • Shows the “Network Error” error message and sets the error details.

    Declaration

    Swift

    func networkError()