CLASS
# Configuration.Builder
@objc(ConfigurationBuilder) public class Builder: NSObject
Builds Configuration objects.
# Methods
# init(projectId:)
@objc public init(projectId: String)
# userStorage(userStorage:)
@objc(userStorageWith:) @discardableResult public func userStorage(
userStorage: UserStorage
) -> Builder
Set custom UserStorage implementation. / Parameter userStorage: custom UserStorage) implementation.
- Returns: Configuration.Builder object.
# 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: Configuration.Builder object.
# 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: Configuration.Builder object.
# 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: Configuration.Builder object.
# 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: Configuration.Builder object.
# Parameters
Name | Description |
---|---|
deviceName | device name |
# applicationInfo(applicationInfo:)
@objc(applicationInfoWith:) @discardableResult public func applicationInfo(
applicationInfo: String
) -> Builder
Sets additional application information that will be sent via X-MIRACL-CLIENT HTTP header.
- Parameter applicationInfo: application info.
- Returns: Configuration.Builder object.
# Parameters
Name | Description |
---|---|
applicationInfo | application info. |
# URLSessionConfiguration(urlSessionConfiguration:)
@objc(URLSessionConfigurationWith:) @discardableResult public func URLSessionConfiguration(
urlSessionConfiguration: URLSessionConfiguration
) -> Builder
Use this when you want to set the custom configuration to the SDK’s instance of URLSession.
As a default value it uses ephemeral
configuration, 30 seconds for timeoutIntervalForRequest
and
300 seconds for timeoutIntervalForResource
.
- Parameter urlSessionConfiguration: configuration for the URLSession to be set.
- Returns: Configuration.Builder object.
# Parameters
Name | Description |
---|---|
urlSessionConfiguration | configuration for the URLSession to be set. |
# build()
@objc public func build() throws -> Configuration
Returns Configuration object. / Throws: ConfigurationError. / Returns: Configuration object.