SubaioConfiguration
public struct SubaioConfiguration
Configuration for the SubaioManager
.
-
URL pointing to root of Subaio template, e.g. if template is at
https://www.bar.foo/template
, then baseUrl should behttps://www.bar.foo
.Declaration
Swift
public let baseUrl: URL
-
Controls whether or not Subaio is allowed to open external URLs.
Declaration
Swift
public let allowExternalUrls: Bool
-
Controls whether or not Subaio is allowed to open a share-dialog (should be implemented in the
SubaioViewDelegate
protocol asisAttemptingToShare
).Declaration
Swift
public let allowShare: Bool
-
Configuration for SSL pinning.
Declaration
Swift
public let sslPinningConfiguration: SubaioSSLPinningConfiguration
-
Callback invoked when token needs to be refreshed. Implementations should take care that the supplied
completionHandler
is always invoked at some point.Declaration
Swift
public let onTokenRequired: TokenRequiredCallback
-
Custom values sent to the views, such as colors and font-paths.
Declaration
Swift
public let customConfig: [String : String]?
-
Initialize a Subaio configuration object with the given parameters
Declaration
Swift
public init(baseUrl: URL, allowExternalUrls: Bool? = nil, allowShare: Bool? = nil, sslPinningConfiguration: SubaioSSLPinningConfiguration, onTokenRequired: @escaping TokenRequiredCallback, customConfig: [String: String]? = nil)
Parameters
baseUrl
URL pointing to root of Subaio template, e.g. if template is at
https://www.bar.foo/template
, then baseUrl should behttps://www.bar.foo
allowExternalUrls
Controls whether or not Subaio is allowed to open external URLs.
allowShare
Controls whether or not Subaio is allowed to open a share-dialog (should be implemented in the
SubaioViewDelegate
protocol asisAttemptingToShare
).sslPinningConfiguration
Configuration for SSL pinning.
onTokenRequired
Callback invoked when token needs to be refreshed. Implementations should take care that the supplied
completionHandler
is always invoked at some point.customConfig
Custom values sent to the views, such as colors and font-paths.