GenerateQrView

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
    private var showingDatePicker: Bool { get nonmutating set }
  • A boolean state variable to control the visibility of the date of birth picker.

    Declaration

    Swift

    @State
    private var showingDOBPicker: Bool { get nonmutating set }
  • id

    A string state variable to store the ID.

    Declaration

    Swift

    @State
    var id: String { get nonmutating set }
  • A string state variable to store the masked ID.

    Declaration

    Swift

    @State
    var maskId: String { get nonmutating set }
  • A string state variable to store the name.

    Declaration

    Swift

    @State
    var name: String { get nonmutating set }
  • A string state variable to store the nationality.

    Declaration

    Swift

    @State
    var nationality: String { get nonmutating set }
  • A string state variable to store the address.

    Declaration

    Swift

    @State
    var address: String { get nonmutating set }
  • A string state variable to store the password.

    Declaration

    Swift

    @State
    var password: String { get nonmutating set }
  • A string state variable to store the date of issue.

    Declaration

    Swift

    @State
    private var dOfIssue: String { get nonmutating set }
  • A string state variable to store the date of birth.

    Declaration

    Swift

    @State
    var dOfBirth: String { get nonmutating set }
  • A date state variable to store the current date.

    Declaration

    Swift

    @State
    var date: Date { get nonmutating set }
  • A string state variable to store the selected date.

    Declaration

    Swift

    @State
    private var selectedDate: String { get nonmutating set }
  • A string state variable to store the date of birth.

    Declaration

    Swift

    @State
    private var dobDate: String { get nonmutating set }
  • A boolean state variable to enable/disable liveliness.

    Declaration

    Swift

    @State
    var isLivnessEnable: Bool { get nonmutating set }
  • An integer state variable to store the scroll target.

    Declaration

    Swift

    @State
    private var scrollTarget: Int { get nonmutating set }
  • A boolean state variable to control the visibility of empty strings.

    Declaration

    Swift

    @State
    var isShowEmptyString: Bool { get nonmutating set }
  • A binding state variable to store the path.

    Declaration

    Swift

    @Binding
    var path: Bool { get nonmutating set }
  • A boolean state variable to control the visibility of the QR detail view.

    Declaration

    Swift

    @State
    var isQrDetailView: Bool { get nonmutating set }
  • A state variable to store the focused input.

    Declaration

    Swift

    @FocusState
    var focusedInput: Int? { get nonmutating set }
  • A keyboard responder object to handle keyboard events.

    Declaration

    Swift

    @StateObject
    private var keyboardResponder: KeyboardResponder { get }
  • A boolean state variable to control the visibility of the error dialog.

    Declaration

    Swift

    @State
    var isShownErrorDialog: Bool { get nonmutating set }
  • An array state variable to store the sense print QR code.

    Declaration

    Swift

    @State
    var sensePrintQr: [UInt8] { get nonmutating set }
  • A boolean state variable to indicate if the view is currently loading.

    Declaration

    Swift

    @State
    var isLoading: Bool { get nonmutating set }
  • A state variable to store the focused QR field.

    Declaration

    Swift

    @FocusState
    private var focusedField: QRFieldType? { get nonmutating set }
  • An enum state variable to store the error type.

    Declaration

    Swift

    @State
    var error: SDKErrors { get nonmutating set }
  • An environment variable to control the presentation mode.

    Declaration

    Swift

    @Environment
    var presentationMode: Binding<PresentationMode> { get }
  • This view represents the Generate QR View.

    Declaration

    Swift

    public var body: some View { get }
  • This function replaces single line comments with JavaDoc-style comments.

    Declaration

    Swift

    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

    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

    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

    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

    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 the sessionHolder in the current SDK state. The generated QR code data is then stored in the sensePrintQr property.

    Note

    This function requires the id, password, and currentSDKState properties to be properly set before calling.

    Important

    This function sets the isLoading property to true before generating the QR code and sets it back to false after the generation is complete.

    Throws

    An error of type SenseCryptSdkError if there is an error during the capture session processing.

    Declaration

    Swift

    func generateSensePrintQR()

    Return Value

    None.

  • This function creates the person metadata.

    Declaration

    Swift

    func createPersonMetaData() -> [String : String]
  • This function creates the person clear data.

    Declaration

    Swift

    func createPersonClearData() -> [String : String]
  • Shows a relative error dialog based on the value of the error property.

    Declaration

    Swift

    func showRelativeErrorDialog() -> some View

    Return Value

    A view representing the error dialog.