FUIPasscodeControllerDelegate

public protocol FUIPasscodeControllerDelegate: class

This protocol defines the functions needed for FUIPasscodeController to notify the app about passcode and TouchID events.

  • User has entered a passcode and the implementation should try the passcode user entered by either open the secure store or compared with saved passcode. If passcode has not been setup previously, the implementation should accept this passcode and store it as the effective passcode. If passcode was already setup, the implementation should try to match the passcode with saved passcode.

    Throws

    FUIPasscodeControllerError when try passcode failed.

    Declaration

    Swift

    func shouldTryPasscode(_ passcode: String, forInputMode inputMode: FUIPasscodeInputMode, fromController passcodeController: FUIPasscodeController) throws

    Parameters

    passcode

    The passcode user entered.

    inputMode

    The purpose of the passcode entered

    passcodeController

    The FUIPasscodeController. This is for app to dismiss the Passcode View when appropriate.

  • User has chosen to cancel the passcode setup or enter passcode process.

    Declaration

    Swift

    func didCancelPasscodeEntry(fromController passcodeController: FUIPasscodeController)

    Parameters

    passcodeController

    The FUIPasscodeController. This is for app to dismiss the Passcode View when appropriate.

  • User has chosen to skip the passcode setup process.

    Declaration

    Swift

    func didSkipPasscodeSetup(fromController passcodeController: FUIPasscodeController)

    Parameters

    passcodeController

    The FUIPasscodeController. This is for app to dismiss the Passcode View when appropriate.

  • User has chosen to reset the passcode.

    Declaration

    Swift

    func shouldResetPasscode(fromController passcodeController: FUIPasscodeController)

    Parameters

    passcodeController

    The FUIPasscodeController. This is for app to dismiss the Passcode View when appropriate.

  • passcodePolicy() Default implementation

    The FUIPasscodePolicy for this app.

    Default Implementation

    Returns default FUIPasscodePolicy, may be overridden by developer

    Declaration

    Swift

    func passcodePolicy() -> FUIPasscodePolicy

    Return Value

    The FUIPasscodePolicy for this app.