Configuration.Builder

CLASS

Configuration.Builder

@objc (ConfigurationBuilder) public class Builder: NSObject

Builds Configuration objects.

Methods

init(projectId:clientId:redirectURI:)

@objc public init(projectId: String, clientId: String, redirectURI: String)

userStorage(userStorage:)

@objc(userStorageWith:) @discardableResult public func userStorage(userStorage: UserStorage) -> Builder

Set custom UserStorage implementation. / Parameter userStorage: custom UserStorage) implementation. / Returns: custom UserStorage implementation.

Parameters

Name Description
userStorage custom ) implementation.

logger(logger:)

@objc(loggerWith:) @discardableResult public func logger(logger: Logger) -> Builder

Set custom Logger writer implementation. / Parameter logger: custom Logger implementation. / Returns: custom Logger implementation.

Parameters

Name Description
logger custom implementation.

loggingLevel(level:)

@objc(loggingLevelWith:) @discardableResult public func loggingLevel(level: LoggingLevel) -> Builder

Sets custom LoggingLevel value. By default it is off. This level can be set only for default logger, otherwise will be ignored. / Parameter level: custom LoggingLevel / Returns: custom LoggingLevel

Parameters

Name Description
level custom

platformURL(url:)

@objc(platformURLWith:) @discardableResult public func platformURL(url: URL) -> Builder

Sets custom MIRACL platform URL.

  • Parameter url: custom MIRACL platform URL.
  • Returns: updated value of MIRACL platform URL.

Parameters

Name Description
url custom MIRACL platform URL.

deviceName(deviceName:)

@objc(deviceNameWith:) @discardableResult public func deviceName(deviceName: String) -> Builder

Sets value of device name.

  • Parameter deviceName: device name
  • Returns: device name

Parameters

Name Description
deviceName device name

build()

@objc public func build() throws -> Configuration

Returns Configuration object. / Throws: ConfigurationError. / Returns: Configuration object.