QrScannerView
@available(iOS 16.0, *)
@MainActor
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 @MainActor private var cameraManager: CameraManager { get }
-
State property for instruction text.
Declaration
Swift
@State @MainActor var tvInstuction: String { get nonmutating set }
-
State property for showAlert.
Declaration
Swift
@State @MainActor private var showAlert: Bool { get nonmutating set }
-
State property for qrBytes.
Declaration
Swift
@State @MainActor var qrBytes: [UInt8] { get nonmutating set }
-
State property for error.
Declaration
Swift
@State @MainActor var err: ErrorType? { get nonmutating set }
-
State property for clearData.
Declaration
Swift
@State @MainActor var clearData: [String : String] { get nonmutating set }
-
State property for isInvalidQrVisible.
Declaration
Swift
@State @MainActor var isInvalidQrVisible: Bool { get nonmutating set }
-
State property for isShownErrorDialog.
Declaration
Swift
@State @MainActor var isShownErrorDialog: Bool { get nonmutating set }
-
State property for showConfirmationDialogBox.
Declaration
Swift
@State @MainActor var showConfirmationDialogBox: Bool { get nonmutating set }
-
State property for isShownPassWordDialog.
Declaration
Swift
@State @MainActor var isShownPassWordDialog: Bool { get nonmutating set }
-
State property for isEmptyPasswordError.
Declaration
Swift
@State @MainActor var isEmptyPasswordError: Bool { get nonmutating set }
-
State property for isPasswordDialogError.
Declaration
Swift
@State @MainActor var isPasswordDialogError: Bool { get nonmutating set }
-
State property for dialogWithRetryButton.
Declaration
Swift
@State @MainActor var dialogWithRetryButton: Bool { get nonmutating set }
-
State property for password.
Declaration
Swift
@State @MainActor var password: String { get nonmutating set }
-
State property for isPinchShow.
Declaration
Swift
@State @MainActor var isPinchShow: Bool { get nonmutating set }
-
typeView: The type of view to be displayed.
Declaration
Swift
@MainActor var typeView: TypeView
-
Third-party lib for QR code reading.
Declaration
Swift
@MainActor let reader: QRReader
-
A boolean state variable to indicate if the view is currently loading.
Declaration
Swift
@State @MainActor var isLoading: Bool { get nonmutating set }
-
Current zoom vale for the camera
Declaration
Swift
@State @MainActor private var currentZoomFactor: CGFloat { get nonmutating set }
-
Selected image form the gallery.
Declaration
Swift
@State @MainActor private var selectedImages: [UIImage] { get nonmutating set }
-
Photo dic oicked form the gallery
Declaration
Swift
@State @MainActor var selectedItems: [PhotosPickerItem] { get nonmutating set }
-
Declaration
Swift
@MainActor let generateQRModel: GenerateSensePrintModel
-
This EnvironmentObject navigationStore give access to all the view we want to navigate to and from It can be used to pop and push the view in the stack.
Declaration
Swift
@EnvironmentObject @MainActor private var navigationStore: NavigationStackController { get }
-
Declaration
Swift
@MainActor var body: some View { get }
-
Verify the password is correct or not
- password: The password to be verified
Declaration
Swift
@MainActor private func checkPassWord(password: String)
-
Check the camera permission.
Declaration
Swift
@MainActor func checkCameraPermission()
-
Navigate to clear data screen
- data: The clear data information
Declaration
Swift
@MainActor func naviageToClearData(data: [String : String])
-
Navigate to the face capture screen.
Declaration
Swift
@MainActor func navigateToFaceCapture()
-
Check the SensePrint type
- sensePrintInfo: The SensePrint information
- QRBytes: The QR code bytes
Declaration
Swift
@MainActor 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
@MainActor func execute(sensePrintInfo: SensePrintInfo, qrBytes: [UInt8])
-
Shows the password dialog.
Declaration
Swift
@MainActor func showPasswordDialog()
-
Shows the invalid QR code message.
Declaration
Swift
@MainActor func showInvalidQr()
-
Shows the “Cannot Connect to Home Server” message and sets the error details.
Declaration
Swift
@MainActor func showCannotConnectToHomeServer()
-
Shows the “Generation Exceeded” error message and sets the error details.
Declaration
Swift
@MainActor func ShowGenrationExceed()
-
Shows the “Verification Exceeded” error message and sets the error details.
Declaration
Swift
@MainActor func showVerificationExceed()
-
Shows the “Number of Available Instances Exceeded” error message and sets the error details.
Declaration
Swift
@MainActor func noOfAvlInstanceExceed()
-
Shows the “Signature Verification Failed” error message and sets the error details.
Declaration
Swift
@MainActor func showSignatureVerificationFailed()
-
Shows the “License Expired” error message and sets the error details.
Declaration
Swift
@MainActor func showLicenseExpired()
-
Shows the “Network Error” error message and sets the error details.
Declaration
Swift
@MainActor func networkError()
-
Declaration
Swift
@MainActor func testingQRCodeParsing()