EmailRecoveryUIProtocol

public protocol EmailRecoveryUIProtocol

Email Recovery UI Protocol

  • Returns an instance of the class conforming to EmailRecoveryUIProtocol protocol.

    Declaration

    Swift

    static func instance() -> EmailRecoveryUIProtocol?
  • Prompts the user to enter an email address that will be used to send badge recovery email.

    Remark

    The UI should take care of dismissing itself upon user’s response and after completion is called.

    Declaration

    Swift

    func promptForEmailToRequestRecoveryCode(completion: @escaping EmailEntryCompletion)
    Parameters
    completion

    Completion block to call once the user enters the email address. The completion block also takes a failureHandler block as a parameter that will be called in case sending recovery email fails. Use this block to present error to user and/or retry sending email.

  • Optional: Method that notifies the UI that the recovery email has been sent successfully. Use this method to notify the user that the email has been sent before the UI is dismissed. If this method is not implemented, the UI will be dismissed immediately after the email is sent.

    Default Implementation
    Declaration

    Swift

    func showRequestSuccessNotification(completion: @escaping () -> Void)
    Parameters
    completion

    Completion block to notify the UsherSDK that the user has viewed the notification and that the UI can be dismissed.

  • Dismiss any UI presented by the promptForEmailToRequestRecoveryCode(completion:)

    Declaration

    Swift

    func dismiss()