Configuration.Builder

CLASS

Configuration.Builder

@objc (ConfigurationBuilder) public class Builder: NSObject

Builds Configuration objects.

Methods

init(projectId:clientId:)

@objc public init(projectId: String, clientId: 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: LoggingMessageWriter) -> Builder

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

Parameters

Name Description
logger custom implementation.

loggerLevel(level:)

@objc(loggerLevelWith:) @discardableResult public func loggerLevel(level: LoggerLevel) -> Builder

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

Parameters

Name Description
level custom

build()

@objc public func build() throws -> Configuration

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

apiURL(url:)

@objc(apiURLWith:) @discardableResult public func apiURL(url: URL) -> Builder