The DispatchQueue module works in conjunction with the Connectivity module and the Consent Manager module to store any pending dispatches to disk while the device is offline, or the user has not yet consented to tracking. When connectivity is restored, or if the user consents to tracking, the queue of dispatches are sent. There is a default limit of 20 dispatches in the queue, and when this is exceeded, the oldest dispatch are cleared to make way for the most recent. Data is stored in UserDefaults.
Usage of this module is required if using Consent Manager or Connectivity modules. Otherwise, it is still strongly recommended to aid with pre-init queueing of events by the TealiumCore module.
The following platforms are supported:
Install the DispatchQueue module with CocoaPods or Carthage.
To install the DispatchQueue module with CocoaPods, add the following pod to your Podfile:
The framework is auto-instantiated. It has a dependency on the TealiumCore pod. Learn more about CocoaPods installation for iOS.
To install the DispatchQueue module with Carthage, following these steps:
Go to the app target’s General configuration page in Xcode.
Add the following framework to the Embedded Binaries section:
The framework is auto-instantiated. It has a dependency on TealiumCore. No additional import statements are necessary. Learn more about Carthage installation for iOS.
The following variables are transmitted with each tracking call while the module is enabled:
Indicates that the dispatch was queued
There are no public API methods for this module. Successes and failures may be monitored through the Delegate module.
The following additional methods are provided by the TealiumConfig class:
Sets the maximum persistent queue size for dispatch storage. Default is 20 events.
Maximum persistent queue size for dispatch storage (default: 20)
Gets the maximum queue size.
Maximum persistent queue size for dispatch storage