VarioqubDefaultsSetupable
public protocol VarioqubDefaultsSetupable : AnyObject
The protocol that provides the default related methods.
-
The callback for
setDefaults(_:callback:)
.Declaration
Swift
typealias DefaultsCallback = () -> Void
-
The callback for XML load related methods.
Declaration
Swift
typealias XmlParserCallback = (Error?) -> Void
-
Adds key-value pairs into the config.
The server config has higher priority over these values.
The method doesn’t block the callee and notifies about finishing via a callback.
See also:
setDefaultsAndWait(_:)
.Declaration
Swift
func setDefaults(_ defaults: [VarioqubFlag : String], callback: DefaultsCallback?)
Parameters
defaults
The dictionary with flags and values.
callback
Notifies when setting is completed.
-
Adds key-value pairs into the config.
The server config has higher priority over these values.
See also:
setDefaults(_:callback:)
.Declaration
Swift
func setDefaultsAndWait(_ defaults: [VarioqubFlag : String])
Parameters
defaults
The dictionary with flags and values.
-
Loads key-value pairs from an XML.
See details about loading and format: https://yandex.ru/support2/varioqub-app/en/sdk/ios/integration#step-3-set-the-default-configuration-using-an-xml-file
See also:
loadXmlAndWait(at:)
.Declaration
Swift
func loadXml(at path: URL, callback: XmlParserCallback?)
Parameters
path
The path to the XML file.
callback
Notifies about finishing.
-
Loads key-value pairs from an XML.
See details about loading and format: https://yandex.ru/support2/varioqub-app/en/sdk/ios/integration#step-3-set-the-default-configuration-using-an-xml-file
See also:
loadXmlAndWait(at:)
.Declaration
Swift
func loadXmlAndWait(at path: URL) throws
Parameters
path
The path to the XML file.
-
Loads key-value pairs from XML-encoded data.
See details about loading and format: https://yandex.ru/support2/varioqub-app/en/sdk/ios/integration#step-3-set-the-default-configuration-using-an-xml-file
See also:
loadXmlAndWait(from:)
.Declaration
Swift
func loadXml(from data: Data, callback: XmlParserCallback?)
Parameters
data
The data that represents XML.
callback
Notifies about finishing.
-
Loads key-value pairs from XML-encoded data.
See details about loading and format: https://yandex.ru/support2/varioqub-app/en/sdk/ios/integration#step-3-set-the-default-configuration-using-an-xml-file
See also:
loadXmlAndWait(at:)
.Declaration
Swift
func loadXmlAndWait(from data: Data) throws
Parameters
from
data that represents xml