WebcomConfiguration
public struct WebcomConfiguration : Codable, Hashable, SelfIdentifiable, CustomStringConvertible, CustomDebugStringConvertible
A value that contains the configuration for a WebcomApplication
.
The Info.plist
file may be used to provide WebcomConfiguration
values.
See the Getting a WebcomApplication guide for more information about that.
-
A value specifying the location of authentication state storage in local storage
See moreDeclaration
Swift
public enum AuthStorage : Codable, Hashable
-
A value representing a cache management mode for the Datasync service.
The cache is updated with data got from the Datasync service when the web socket is connected (online). Data in the cache can then be used when the web socket is disconnected (offline).
This value is used when initializing a
See moreWebcomApplication
to manage how the cache is initialized and how/when it is saved.Declaration
Swift
public enum CacheMode : Codable, Hashable
-
A value representing a version of the protocol for the web socket of the Datasync service.
See moreDeclaration
Swift
public enum WebSocketProtocol : String, Codable, Hashable
-
A value representing the configuration for the web socket of the Datasync service.
See moreDeclaration
Swift
public struct WebSocketConfiguration : Codable, Hashable
-
A local key to retrieve this configuration.
This key has no meaning for the back-end. It is useful to retrieve the configuration in a collection.
Declaration
Swift
public var key: String?
-
The identifier of the application on the back-end.
Declaration
Swift
public let identifier: String
-
Defines the ratio of the push notification duration before triggering its refresh
Declaration
Swift
public let pushNotificationRefreshDurationRatio: UInt
-
The platform of this application.
The default value of this property is
Webcom.defaultPlatform
.Declaration
Swift
public var platform: URL
-
The cache mode for the Datasync service.
The default value of this property is
CacheMode.default
.Declaration
Swift
public var cacheMode: CacheMode
-
The configuration for the web socket of the Datasync service.
Declaration
Swift
public var webSocket: WebcomConfiguration.WebSocketConfiguration
-
The authentication state storage key
Declaration
Swift
public var authStorage: AuthStorage
-
Creates a new instance.
Other properties of the configuration are initialized with their default values and can be modified using setters.
Declaration
Swift
public init(identifier: String, cacheMode: CacheMode = .default, authStorage: AuthStorage = .default, pushNotificationRefreshDurationRatio: UInt = Webcom.defaultPushNotificationRefreshRatio)
Parameters
identifier
The identifier of the application on the back-end.
cacheMode
The cache mode for the Datasync service.
authStorage
Specifies where to store the authentication state of the Authentication. By default, authentication storage is not shared between
WebcomApplication
instances, setting this parameter with some value will allow share of authentication state.pushNotificationRefreshDurationRatio
Defines the ratio of the push notification duration before triggering its refresh.
-
Declaration
Swift
public init(from decoder: Decoder) throws
-
Declaration
Swift
public func encode(to encoder: Encoder) throws
-
The path of this configuration.
The returned value uniquely identified an application on a back-end platform.
Declaration
Swift
public var path: String { get }
-
Indicates whether this configuration uses the default platform.
The default platform is
Webcom.defaultPlatform
.Declaration
Swift
public var usesDefaultPlatform: Bool { get }
-
Custom information not used by the SDK.
Declaration
Swift
public var customInfo: [String : Any] { get }
-
Declaration
Swift
public var description: String { get }
-
Declaration
Swift
public var debugDescription: String { get }