SDK UI Protocols

  • The LoginUIProtocol is adopted by a class to present a user interface that prompts the user to enter login credentials. Login credentials are required by the UsherSDK to validate the user’s credentials and restore a badge.

    Declaration

    Swift

    public protocol LoginUIProtocol
  • Completion block to be called when a user has completed entering credentials.

    Declaration

    Swift

    public typealias CredentialEntryCompletion = (_ username: String?, _ password: String?, _ loginFailureHandler: UsherFailureHandler?) -> Void
    Parameters
    username

    Entered username

    password

    Entered password

    loginFailureHandler

    Optional block for handling login errors that occured when UsherSDK tries to validate the provided credential.

  • Passcode UI Protocol

    Declaration

    Swift

    public protocol PasscodeUIProtocol
  • Declaration

    Swift

    public typealias PasscodeVerificationResult = (_ success: Bool, _ attemptsRemaining: Int) -> Void
    Parameters
    success

    If the verification succeeded or failed

    attemptsRemaining

    A max of 10 attempts are allowed. If exhausted, all user data is deleted.

  • UI Protocol for error handling of revoked badge

    Declaration

    Swift

    public protocol RevokedUIProtocol