Module
public protocol Module : AnyObject
A Module is the generic protocol that any plugin added to tealium must conform.
Each module, then, can conform to each of the following protocols as well to add extra functionality:
Collector: To enrich the collectedDispatches with extra data.Dispatcher: To send theDispatches and their data outside of this SDK, potentially the Tealium Platform or a 3rd party Vendor.Transformer: The underlying protocol for modules that implement Transformations — data modifications applied to dispatches before they reach dispatchers.
A module can also reach the other modules, by type or by protocol, through the ModuleManager it receives as context.moduleManager. See Creating Custom Modules for how to resolve one without assuming it has been created yet.
A module used by the Tealium SDK to provide some plugin functionality.
-
The version of this module
Declaration
Swift
var version: String { get } -
The unique id for this module, used to uniquely identify each module instance.
Declaration
Swift
var id: String { get } -
canBeDisabledDefault implementationReturns true if the module is optional and can be disabled, or false otherwise. Default is true.
Default Implementation
Declaration
Swift
static var canBeDisabled: Bool { get } -
moduleTypeDefault implementationThe unique type identifier for this module kind, shared across all instances of the same module type.
Default Implementation
Declaration
Swift
static var moduleType: String { get } -
updateConfiguration(_:Default implementation) Updates the configuration for this module.
Return
selfto keep this instance with the new configuration. Returnnilif the configuration is invalid, in which case the module is disabled and shut down.Default Implementation
Declaration
Swift
func updateConfiguration(_ configuration: DataObject) -> Self? -
shutdown()Default implementationCalled when a previously created module needs to shut down, to allow it to perform some final cleanup before removing it form the available modules.
Default Implementation
Declaration
Swift
func shutdown()
View on GitHub