PasscodeUIProtocol

public protocol PasscodeUIProtocol

Passcode UI Protocol

  • Returns an instance of the class conforming to PasscodeUIProtocol protocol

    Declaration

    Swift

    static func instance() -> PasscodeUIProtocol?
  • Prompt the user to enter a passcode

    Declaration

    Swift

    func promptForPasscode(mode: PasscodeUIMode, completion: @escaping (_ passcode: String?, _ result: PasscodeVerificationResult?) -> Void)
    Parameters
    mode

    Passcode entry UI mode. See PasscodeUIMode

    completion

    Completion block to call once the user enters a passcode. Pass the entered password string to this completion block. The completion block also takes a result block as a parameter that will be called with the passcode verification result and number remaining fail tries before the badge is deleted. Use this block to present error to the user, inform them about the remaining fail counts, and/or retry passcode entry.

  • Prompt user about errors that occured during passcode and Touch ID verification workflows.

    Declaration

    Swift

    func promptUserWithErrorMessage(message: String, completion: @escaping () -> Void)
    Parameters
    message

    Localized error message.

    completion

    Completion block to be called once the user confirms the error message.

  • Dismiss any UI presented by the promptForPasscode(_:completion:) or promptUserWithErrorMessage(message:completion)

    Declaration

    Swift

    func dismiss()