PassiveFaceCaptureView

struct PassiveFaceCaptureView : View

Represents a view for passive face capture. This view is responsible for capturing the user’s face passively and performing various actions based on the captured data. It includes features such as generating QR codes, scanning QR codes, and displaying detailed information about the captured face.

  • path: A binding to a boolean value indicating the current path.
  • qrBytes: A binding to an array of UInt8 representing the QR code bytes.
  • recordId: A string representing the record ID.
  • faceBytes: A data object representing the captured face bytes.
  • password: A string representing the password.
  • typeView: An optional TypeView enum representing the type of view.
  • sessionForDecriptQr: An optional PassiveFaceCaptureSession representing the session for decrypting QR codes. Note: This view requires camera access permission from the user.
  • A binding to a boolean value indicating the current path.

    Declaration

    Swift

    @Binding
    var path: Bool { get nonmutating set }
  • A state object representing the passive face capture factory.

    Declaration

    Swift

    @StateObject
    private var faceCaptureFactory: PassiveFaceCaptureFactory { get }
  • A boolean value indicating whether to show the camera access alert.

    Declaration

    Swift

    @State
    private var showAlert: Bool { get nonmutating set }
  • A string representing the instruction shown on the view.

    Declaration

    Swift

    @State
    var tvInstuction: String { get nonmutating set }
  • An array of UInt8 representing the QR code bytes.

    Declaration

    Swift

    @Binding
    var qrBytes: [UInt8] { get nonmutating set }
  • A boolean value indicating whether to capture the face.

    Declaration

    Swift

    @State
    var isCapture: Bool { get nonmutating set }
  • A boolean value indicating whether to show the person detail view.

    Declaration

    Swift

    @State
    var isPersonDetial: Bool { get nonmutating set }
  • A boolean value indicating whether to show the error dialog.

    Declaration

    Swift

    @State
    var isShownErrorDialog: Bool { get nonmutating set }
  • A dictionary representing the metadata.

    Declaration

    Swift

    @State
    var metaData: [String : String] { get nonmutating set }
  • A string representing the record ID.

    Declaration

    Swift

    @State
    var recordId: String { get nonmutating set }
  • A data object representing the captured face bytes.

    Declaration

    Swift

    @State
    var faceBytes: Data { get nonmutating set }
  • An error type representing the error.

    Declaration

    Swift

    @State
    var error: SDKErrors { get nonmutating set }
  • An error type representing the other error.

    Declaration

    Swift

    @State
    var otherError: ErrorType { get nonmutating set }
  • A boolean value indicating whether the view is loading.

    Declaration

    Swift

    @State
    var isLoading: Bool { get nonmutating set }
  • A boolean value indicating whether to show the generate QR view.

    Declaration

    Swift

    @Environment
    var presentationMode: Binding<PresentationMode> { get }
  • A string representing the password.

    Declaration

    Swift

    var password: String
  • A value representing the current zoom factor.

    Declaration

    Swift

    @State
    private var currentZoomFactor: CGFloat { get nonmutating set }
  • A boolean value indicating whether the lighting has failed.

    Declaration

    Swift

    @State
    var isLightingFailed: Bool { get nonmutating set }
  • A boolean value indicating whether to show user genrated QR code.

    Declaration

    Swift

    @State
    var isGenerateQr: Bool { get nonmutating set }
  • A boolean value indicating whether the pinch gesture is active.

    Declaration

    Swift

    @State
    var isActivePinch: Bool { get nonmutating set }
  • TypeView enum representing the type of view.

    Declaration

    Swift

    var typeView: TypeView?
  • A passive face capture session.

    Declaration

    Swift

    var sessionForDecriptQr: PassiveFaceCaptureSession?
  • Updates the user interface based on the provided PassiveFaceCaptureModel. This method should be called on the main queue to ensure UI updates are performed on the main thread.

    Declaration

    Swift

    func updateUI(model: PassiveFaceCaptureModel)

    Parameters

    model

    The PassiveFaceCaptureModel object containing the data to update the UI.

  • This method is called when the face capture session is completed.

    Declaration

    Swift

    func sessionCompleted(model: PassiveFaceCaptureModel)
  • Displays an error message on the screen.

    Declaration

    Swift

    func showError(model: PassiveFaceCaptureModel)
  • Declaration

    Swift

    var body: some View { get }
  • Check the camera permission

    Declaration

    Swift

    func checkCameraPermission()
  • Get the error view and show different dialog according to the error type

    Declaration

    Swift

    func showRelativeErrorDialog() -> some View

    Return Value

    A view representing the error view

  • Shows an error dialog for active timeout.

    • error: The error object containing details about the error.

    Declaration

    Swift

    func showActiveTimeOutError(_ error: SDKErrors) -> some View

    Return Value

    A view that displays the error dialog.

  • 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 containing localized error information.

    Return Value

    A view representing the confirmation dialog with retry option.

  • Show no face detected error dialog

    • error: The error object

    Declaration

    Swift

    func showFaceCaptureNoFaceDetected(_ error: SDKErrors) -> some View

    Return Value

    A view representing the liveness error 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

  • Show face capture error dialog

    • error: The error object

    Declaration

    Swift

    func showFaceCapturError(_ error: SDKErrors) -> some View

    Return Value

    A view representing the liveness error dialog

    • Displays an error dialog for liveness failure.
    • - Parameters:
    • error: The error that occurred during liveness check.

    Declaration

    Swift

    func showLivenessError(_ error: SDKErrors) -> some View

    Parameters

    error

    The error that occurred during liveness check.

    Return Value

    A view representing the error dialog.

  • Creates a dialog view with a single button.

    • error: The error object containing localized error information.

    Declaration

    Swift

    func dialogWithSingleButton(_ error: SDKErrors) -> some View

    Return Value

    A view that displays the dialog with the error information.

  • Set up camera configuration to initial

    Declaration

    Swift

    func setUpInitial()
  • Tries to decrypt the given SensePrint QR with the captured face.

    Declaration

    Swift

    func decryptSensePrintQR()