TwilioVerifyBuilder

public class TwilioVerifyBuilder

Builder class that builds an instance of TwilioVerifyManager, which handles all the operations regarding Factors and Challenges

  • Creates a new instance of TwilioVerifyBuilder

    Declaration

    Swift

    public init()
  • Set the NetworkProvider that will be used by the TwilioVerify instance.

    Declaration

    Swift

    public func setNetworkProvider(_ networkProvider: NetworkProvider) -> Self

    Parameters

    networkProvider

    instance of a NetworkProvider

  • Defines if the storage will be cleared after a reinstall

    Declaration

    Swift

    public func setClearStorageOnReinstall(_ clearStorageOnReinstall: Bool) -> Self

    Parameters

    clearStorageOnReinstall

    If true, the storage will be cleared after a reinstall, so created factors will not exist in the device anymore. If false, created factors will persist in the device. Default value is true

  • Enables the default logger

    Declaration

    Swift

    public func enableDefaultLoggingService(withLevel level: LogLevel) -> Self

    Parameters

    level

    Desired level of logging

  • Adds a custom Logging Service

    Declaration

    Swift

    public func addLoggingService(_ service: LoggerService) -> Self

    Parameters

    service

    Custom logging service to be used to log information

  • Buids an instance of TwilioVerifyManager

    Throws

    TwilioVerifyError.initializationError if an error occurred while initializing.

    Declaration

    Swift

    public func build() throws -> TwilioVerify

    Return Value

    An instance of TwilioVerify.