DeviceProvisioningUIProtocol

public protocol DeviceProvisioningUIProtocol

Device Provisioning UI Protocol

  • Returns an instance of the class conforming to DeviceProvisioningUIProtocol protocol

    Declaration

    Swift

    static func instance() -> DeviceProvisioningUIProtocol
  • Prompts the user to enter a phone number for enrollment.

    Note

    The UI class conforming to DeviceProvisioningUIProtocol is responsible for validating the entered number and making sure it includes the country code. Or else Usher SDK will return with error.
    Declaration

    Swift

    func promptPhoneNumberEnrollment(badge: Badge, completion: @escaping (_ phoneNumber: String?, _ errorHandler: UsherFailureHandler?) -> Void)
    Parameters
    badge

    The badge requiring device provisioning

    completion

    Completion of user phone number entry.

  • Prompts the user to confirm sending a verification code to the enrolled phone number via SMS.

    Declaration

    Swift

    func promptGetVerificationCodeRequest(badge: Badge, intent: MFAIntent?, completion: @escaping (_ confirmed: Bool, _ errorHandler: UsherFailureHandler?) -> Void)
    Parameters
    badge

    The badge requiring device provisioning

    intent

    The intent for the provisioning. See MFAIntent for options

    completion

    Completion after user confirmation

  • Prompts user to enter verification code sent to device.

    Declaration

    Swift

    func promptVerificationCodeEntry(badge: Badge, tempPhoneNumber: String?, intent: MFAIntent?, completion: @escaping (_ code: String?, _ shouldRetry: Bool, _ errorHandler: UsherFailureHandler?) -> Void)
    Parameters
    badge

    The badge requiring device provisioning

    tempPhoneNumber

    A phone number in case there is no enrolled phone number for the badge. This parameter will have a value in fresh enrollment of phone number workflow.

    intent

    The intent for the provisioning. See MFAIntent for options

    completion

    Completion after user entered verification code.

  • Dismiss all UIs presented.

    Declaration

    Swift

    func dismiss()