Modules

public enum Modules

The list of modules factories that can be used to instantiate and pass modules to the TealiumConfig.

  • The Types for the modules

    See more

    Declaration

    Swift

    enum Types
  • A block with a utility builder that can be used to enforce some of the ModuleSettings instead of relying on Local or Remote settings. Only the settings built with this builder will be enforced and remain constant during the lifecycle of the Module, other settings will still be affected by Local and Remote settings and updates.

    Declaration

    Swift

    typealias EnforcingSettings<Builder> = (_ enforcedSettings: Builder) -> Builder
  • Returns a factory for creating the AppDataModule.

    Declaration

    Swift

    static func appData(forcingSettings block: EnforcingSettings<AppDataSettingsBuilder>? = { $0 }) -> some ModuleFactory

    Parameters

    block

    A block used to provide programmatic settings. See EnforcingSettings. Pass nil to initialize this module only when some Local or Remote settings are provided. Omitting this parameter will initialize the module with its default settings.

  • Returns a factory for creating the CollectModule.

    Declaration

    Swift

    static func collect(forcingSettings block: EnforcingSettings<CollectSettingsBuilder>? = { $0 }) -> some ModuleFactory

    Parameters

    block

    A block used to provide programmatic settings. See EnforcingSettings. Pass nil to initialize this module only when some Local or Remote settings are provided. Omitting this parameter will initialize the module with its default settings.

  • Returns a factory for creating the CollectModule.

    When using this method, be sure to provide different module IDs per each CollectSettingsBuilder provided. If multiple builders result in having the same module ID, only the first one will be used. Default module ID will be the Modules.Types.collect (Collect).

    Declaration

    Swift

    static func collect(forcingSettings block: @escaping EnforcingSettings<CollectSettingsBuilder>,
                        _ blocks: EnforcingSettings<CollectSettingsBuilder>...) -> some ModuleFactory

    Parameters

    block

    A block with a utility builder that can be used to enforce some of the CollectSettings instead of relying on Local or Remote settings. Only the settings built with this builder will be enforced and remain constant during the lifecycle of the CollectModule, other settings will still be affected by Local and Remote settings and updates.

    blocks

    Other blocks used to configure additional collect modules.

  • Returns a factory for creating the DataLayerModule.

    Declaration

    Swift

    static func dataLayer(forcingSettings block: EnforcingSettings<DataLayerSettingsBuilder> = { $0 }) -> some ModuleFactory

    Parameters

    block

    A block used to provide programmatic settings. See EnforcingSettings. Omitting this parameter will initialize the module with its default settings.

  • Returns a factory for creating the DeviceDataModule.

    Declaration

    Swift

    static func deviceData(forcingSettings block: EnforcingSettings<DeviceDataSettingsBuilder>? = { $0 }) -> some ModuleFactory

    Parameters

    block

    A block used to provide programmatic settings. See EnforcingSettings. Pass nil to initialize this module only when some Local or Remote settings are provided. Omitting this parameter will initialize the module with its default settings.

  • Returns a factory for creating the DeepLinkModule.

    Declaration

    Swift

    static func deepLink(forcingSettings block: EnforcingSettings<DeepLinkSettingsBuilder>? = { $0 }) -> some ModuleFactory

    Parameters

    block

    A block used to provide programmatic settings. See EnforcingSettings. Pass nil to initialize this module only when some Local or Remote settings are provided. Omitting this parameter will initialize the module with its default settings.

  • Returns a factory for creating the TealiumDataModule.

    Declaration

    Swift

    static func tealiumData(forcingSettings block: EnforcingSettings<TealiumDataSettingsBuilder> = { $0 }) -> some ModuleFactory

    Parameters

    block

    A block used to provide programmatic settings. See EnforcingSettings. Omitting this parameter will initialize the module with its default settings.

  • Returns a factory for creating the TimeDataModule.

    Declaration

    Swift

    static func timeData(forcingSettings block: EnforcingSettings<TimeDataSettingsBuilder>? = { $0 }) -> some ModuleFactory

    Parameters

    block

    A block used to provide programmatic settings. See EnforcingSettings. Pass nil to initialize this module only when some Local or Remote settings are provided. Omitting this parameter will initialize the module with its default settings.

  • Returns a factory for creating the ConnectivityDataModule.

    Declaration

    Swift

    static func connectivityData(forcingSettings block: EnforcingSettings<ConnectivityDataSettingsBuilder>? = { $0 }) -> some ModuleFactory

    Parameters

    block

    A block used to provide programmatic settings. See EnforcingSettings. Pass nil to initialize this module only when some Local or Remote settings are provided. Omitting this parameter will initialize the module with its default settings.

  • Returns a factory for creating the TraceModule.

    Declaration

    Swift

    static func trace(forcingSettings block: EnforcingSettings<TraceSettingsBuilder>? = { $0 }) -> some ModuleFactory

    Parameters

    block

    A block used to provide programmatic settings. See EnforcingSettings. Pass nil to initialize this module only when some Local or Remote settings are provided. Omitting this parameter will initialize the module with its default settings.

  • Adds a ModuleFactory to the list of default factories that are added to each Tealium instance.

    Each module added in this list will be added only if the same module wasn’t already added in the specific config object. Generally factories added by default will not return any enforced settings, meaning that they will require some local or remote settings to initialize the respective modules.

    If they contain some settings, instead, their modules will be initialized even if they are not configured elsewhere.

    Declaration

    Swift

    static func addDefaultModule<SpecificFactory>(_ module: SpecificFactory) where SpecificFactory : ModuleFactory
  • lifecycle(forcingSettings:) From TealiumPrismLifecycle

    Returns a factory for creating the LifecycleModule.

    Declaration

    Swift

    static func lifecycle(forcingSettings block: EnforcingSettings<LifecycleSettingsBuilder>? = { $0 }) -> some ModuleFactory

    Parameters

    block

    A block with a utility builder that can be used to enforce some of the LifecycleSettings instead of relying on Local or Remote settings. Only the settings built with this builder will be enforced and remain constant during the lifecycle of the LifecycleModule, other settings will still be affected by Local and Remote settings and updates.

  • momentsAPI(forcingSettings:) From TealiumPrismMomentsAPI

    Returns a factory for creating the MomentsAPIModule.

    Declaration

    Swift

    static func momentsAPI(forcingSettings block: EnforcingSettings<MomentsAPISettingsBuilder>? = { $0 }) -> some ModuleFactory

    Parameters

    block

    A block with a utility builder that can be used to enforce some of the MomentsAPISettings instead of relying on Local or Remote settings. Only the settings built with this builder will be enforced and remain constant during the lifecycle of the MomentsAPIModule, other settings will still be affected by Local and Remote settings and updates.