Swift: Modules List

Swift: Modules List

by ‎12-22-2017 06:36 AM - edited ‎07-18-2018 01:35 PM (577 Views)

The Tealium Swift library is designed around a modular architecture. Modules instantiate themselves automatically if they are present, and retrieve their configuration from the TealiumConfig object you create at initialization time. If you are installing the library manually, you may completely remove unneeded/unwanted modules from your project, and they will not be invoked. If you are using a dependency manager, this level of control is not currently available, but modules can be disabled by a setting in the TealiumConfig object (see: Swift Class: TealiumConfig). The modules are listed below in priority order (the internal order in which auto-instantiation takes place). Where additional documentation is required/available, this is linked from the module name in the table.

Module Name ID Module Priority (Load Order) Module Group Description Supported Platforms Usage Notes
ConsentManager consentmanager 50 - Allows users to select their preferred level of tracking, or decline consent completely iOS, macOS, tvOS, watchOS  Recommended  -
Logger logger 100 - Debug logging iOS, macOS, tvOS, watchOs Recommended -
Lifecycle lifecycle 175 - Tracks launches, wakes, sleeps, and crash instances. Auto or manually. iOS, tvOS, watchOS Recommended -
Autotracking autotracking 300 - Prepares & sends dispatches for most UI, including viewDidAppear, events. iOS, tvOS Not Recommended* -
FileStorage filestorage 350 Persistent Storage Adds general persistence capability for any module. Replaces the Defaults Storage module. Backed by NSKeyedArchiver iOS, macOS, watchOS, tvOS Recommended*  
DefaultsStorage defaultsstorage 360 Persistent Storage Adds general persistence capability for any module. Backed by UserDefaults iOS, tvOS, watchOS, macOS Recommended*  
Attribution attribution 400 - Adds IDFA to track data. iOS Optional Requires additional entitlements from Apple. Manual import option only.
AppData appdata 500 - Adds app_uuid to track data. iOS, macOS, tvOS, watchOS Recommended -
Datasource datasource 550 - Adds an additional config init option for datasource ids. iOS, macOS, tvOS, watchOS Recommended -
DeviceData devicedata 525 - Add as additional device info to all track data. iOS Recommended -
PersistentData persistentdata 600 - Adds ability to add persistent data to all track data. iOS, macOS, tvOS, watchOS Recommended -
Volatile Data volatiledata 700 - Adds ability to add session persistent data to all track data - clears upon app termination/close. iOS, macOS, tvOS, watchOS Recommended Will supersede any Persistent value with the same key(s)
Delegate delegate 900 - Adds multicast delegates to monitor or suppress track dispatches. iOS, macOS, tvOS, watchOS Optional -
Connectivity connectivity 950 - Adds ability to flag track messages for delayed delivery due to connectivity loss. iOS, macOS, tvOS Recommended Requires SystemConfiguration
DispatchQueue dispatchqueue  1000  -  Stores dispatches offline when queued by connectivity or consent manager modules iOS, macOS, tvOS, watchOS     
Collect collect 1000 Dispatchers Packages and delivers track call to Tealium Collect or other custom URL endpoint. iOS, macOS, tvOS, watchOS Optional* -
TagManagement tagmanagement 1100 Dispatchers UIWebview based dispatch service that permits library to run TIQ/utag.js. iOS Optional* Requires UIWebView
RemoteCommands remotecommands 1200 - Permits configurable remote code block execution via URLScheme, UIWebView, or TagManagement. iOS Optional* -

* Please read documentation for full details. Where a module is listed as optional, and it has a "module group" listed, one or both modules of the same module group is required to fulfil the library's tracking requirements. For example, Collect and Tag Management are in the "Dispatchers" group, and you need at least one of these enabled for any data to be sent. Likewise with the Persistent Storage group; you need one or the other to be enabled, or you will not get any persistent storage options.

Recommended Default Modules

Please speak to your account manager if you are unsure which products you are licensed for

These are recommended default module module lists for most implementations. You are free to add/remove modules as needed.

  • Option 1: If using Tealium iQ (Tag Management) only
let modulesList = TealiumModulesList(isWhiteList: true, modulesList: [
"consentmanager","dispatchqueue","logger", "lifecycle", "filestorage", "attribution", "appdata", "datasource", "devicedata", "persistentdata", "volatiledata", "connectivity", "tagmanagement", "remotecommands"])
  • Option 2: If using Tealium UDH (Collect) only
let modulesList = TealiumModulesList(isWhiteList: true, modulesList: [
"consentmanager","dispatchqueue","logger", "lifecycle", "filestorage", "attribution", "appdata", "datasource", "devicedata", "persistentdata", "volatiledata", "connectivity", "collect"])
  • Option 3: If using Tealium UDH and Tealium iQ together

Please see Collect documentation to decide whether Collect module is actually required.

let modulesList = TealiumModulesList(isWhiteList: true, modulesList: [
"consentmanager","dispatchqueue","logger", "lifecycle", "filestorage", "attribution", "appdata", "datasource", "devicedata", "persistentdata", "volatiledata", "connectivity", "tagmanagement", "remotecommands", "collect"])