Data Management
Learn how to manage persistent and volatile data.
Usage
Some variables are required on every event. To prevent having to manually add required variable data to every event, you have the option to store data as either volatile or persistent. Once data is stored, it will be appended to every event, including lifecycle events.
Persistent and volatile data values are stored on the device as an NSDictionary objects.
Learn more about Data Management.
Persistent Data
The persistent object is merged into each event and preserved between launches of the app.
The addPersistentDataSources()
method adds key-value data into the library instance’s persistent data store, as shown in the following example:
[self.tealium addPersistentDataSources:@{@"KEY": @"VALUE"}];
NSDictionary *persistentDataSources = [self.tealium persistentDataSourcesCopy];
Volatile Data
A volatile object is discarded upon closing the app and restarting.
The addVolatileDataSources()
method adds key-value data into the temporary data sources dictionary, as shown in the following example:
[self.tealium addVolatileDataSources:@{@"KEY": @"VALUE"}];
NSDictionary *volatileDataSources = [self.tealium volatileDataSourcesCopy];
This page was last updated: January 7, 2023