GenerateQrView
@MainActor
public struct GenerateQrView : View
This struct represents the view for generating a QR code. It includes various text fields and buttons for user input. It also handles error messages and loading indicators.
-
A boolean state variable to control the visibility of the date picker.
Declaration
Swift
@State @MainActor private var showingDatePicker: Bool { get nonmutating set }
-
A boolean state variable to control the visibility of the date of birth picker.
Declaration
Swift
@State @MainActor private var showingDOBPicker: Bool { get nonmutating set }
-
A string state variable to store the ID.
Declaration
Swift
@State @MainActor var id: String { get nonmutating set }
-
A string state variable to store the masked ID.
Declaration
Swift
@State @MainActor var maskId: String { get nonmutating set }
-
A string state variable to store the name.
Declaration
Swift
@State @MainActor var name: String { get nonmutating set }
-
A string state variable to store the nationality.
Declaration
Swift
@State @MainActor var nationality: String { get nonmutating set }
-
A string state variable to store the address.
Declaration
Swift
@State @MainActor var address: String { get nonmutating set }
-
A string state variable to store the password.
Declaration
Swift
@State @MainActor var password: String { get nonmutating set }
-
A string state variable to store the date of issue.
Declaration
Swift
@State @MainActor private var dOfIssue: String { get nonmutating set }
-
A string state variable to store the date of birth.
Declaration
Swift
@State @MainActor var dOfBirth: String { get nonmutating set }
-
A date state variable to store the current date.
Declaration
Swift
@State @MainActor var date: Date { get nonmutating set }
-
A string state variable to store the selected date.
Declaration
Swift
@State @MainActor private var selectedDate: String { get nonmutating set }
-
A string state variable to store the date of birth.
Declaration
Swift
@State @MainActor private var dobDate: String { get nonmutating set }
-
A boolean state variable to enable/disable liveliness.
Declaration
Swift
@State @MainActor var isLivnessEnable: Bool { get nonmutating set }
-
An integer state variable to store the scroll target.
Declaration
Swift
@State @MainActor private var scrollTarget: Int { get nonmutating set }
-
A boolean state variable to control the visibility of empty strings.
Declaration
Swift
@State @MainActor var isShowEmptyString: Bool { get nonmutating set }
-
A state variable to store the focused input.
Declaration
Swift
@FocusState @MainActor var focusedInput: Int? { get nonmutating set }
-
A keyboard responder object to handle keyboard events.
Declaration
Swift
@StateObject @MainActor private var keyboardResponder: KeyboardResponder { get }
-
A boolean state variable to control the visibility of the error dialog.
Declaration
Swift
@State @MainActor var isShownErrorDialog: Bool { get nonmutating set }
-
An array state variable to store the sense print QR code.
Declaration
Swift
@State @MainActor var sensePrintQr: [UInt8] { get nonmutating set }
-
A boolean state variable to indicate if the view is currently loading.
Declaration
Swift
@State @MainActor var isLoading: Bool { get nonmutating set }
-
A state variable to store the focused QR field.
Declaration
Swift
@FocusState @MainActor private var focusedField: QRFieldType? { get nonmutating set }
-
An enum state variable to store the error type.
Declaration
Swift
@State @MainActor var error: SDKErrors { get nonmutating set }
-
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 }
-
This view represents the Generate QR View.
Declaration
Swift
@MainActor public var body: some View { get }
-
This function replaces single line comments with JavaDoc-style comments.
Declaration
Swift
@MainActor func dialogWithSingleButton(_ error: SDKErrors) -> some View
-
Displays a confirmation dialog with the specified error details and provides options to retry or cancel.
- error: The error object containing the localized error description.
Declaration
Swift
@MainActor private func showLivenessError(_ error: SDKErrors) -> some View
Return Value
A view representing the confirmation dialog.
-
A private function that creates a confirmation dialog with a retry option based on the given error.
Declaration
Swift
@MainActor private func confirmationDialogWithRetry(_ error: SDKErrors) -> some View
Parameters
error
The error object that provides localized error descriptions.
Return Value
A view that represents the confirmation dialog with retry option.
-
A private function that displays a confirmation dialog for multiple face errors.
error: The error object containing localized error information.
Declaration
Swift
@MainActor private func confirmationDialogForMultipleFace(_ error: SDKErrors) -> some View
Return Value
A view that displays the confirmation dialog.
-
Show face capture multiple face error dialog
error: The error object
Declaration
Swift
@MainActor func showFaceCapturMultipleFaceError(_ error: SDKErrors) -> some View
Return Value
A view representing the liveness error dialog
-
Generates a SensePrint QR code. This function generates a SensePrint QR code by creating a request with the provided data and calling the
generateSensePrintQR
method of thesessionHolder
in the current SDK state. The generated QR code data is then stored in thesensePrintQr
property.Note
This function requires theid
,password
, andcurrentSDKState
properties to be properly set before calling.Important
This function sets theisLoading
property totrue
before generating the QR code and sets it back tofalse
after the generation is complete.Throws
An error of typeSenseCryptSdkError
if there is an error during the capture session processing.Declaration
Swift
@MainActor func generateSensePrintQR()
Return Value
None.
-
This function creates the person metadata.
Declaration
Swift
@MainActor func createPersonMetaData() -> [String : String]
-
This function creates the person clear data.
Declaration
Swift
@MainActor func createPersonClearData() -> [String : String]
-
Shows a relative error dialog based on the value of the
error
property.Declaration
Swift
@MainActor func showRelativeErrorDialog() -> some View
Return Value
A view representing the error dialog.
-
Declaration
Swift
@MainActor func genrationQRFormTestUITestCase()