BFTouchID

public struct BFTouchID

This struct adds some useful functions to use TouchID.

  • Touch result enum:

    • success: Success.
    • error: Error.
    • authenticationFailed: Authentication Failed.
    • userCancel: User Cancel.
    • userFallback: User Fallback.
    • systemCancel: System Cancel.
    • passcodeNotSet: Passcode Not Set.
    • notAvailable: Touch IDNot Available.
    • notEnrolled: Touch ID Not Enrolled.
    • lockout: Touch ID Lockout.
    • appCancel: App Cancel.
    • invalidContext: Invalid Context.
    See more

    Declaration

    Swift

    public enum TouchIDResult: Int
  • Shows the TouchID authentication.

    Declaration

    Swift

    public static func showTouchID(reason: String, fallbackTitle: String? = nil, completion: @escaping (_ result: TouchIDResult) -> Void)

    Parameters

    reason

    Text to show in the alert.

    fallbackTitle

    Default title Enter Password is used when this property is left nil. If set to empty string, the button will be hidden.

    completion

    Completion handler.

    result

    Returns the TouchID result, from the TouchIDResult enum.