If you are using Swift 1.8.0+, this module is already included in the Core and you do not need to install it. For prior version, follow this guide to install the module.
The DefaultStorage Module provides persistent data storage, backed by UserDefaults. This module must be used in conjunction with the Swift Module: PersistentData.
If you are using the Persistent Data module (recommended), you must also use either the Defaults Storage or File Storage module to make the data persist across app launches. Whether you choose Defaults Storage over File Storage is personal choice. If both FileStorage and DefaultsStorage are included and enabled, FileStorage take precedence and DefaultsStorage effectively becomes inactive.
The following platforms are supported:
Install the DefaultStorage module with CocoaPods or Carthage.
To install the DefaultStorage module with CocoaPods, add the following pod to your Podfile:
The framework is auto-instantiated. It has a dependency on the TealiumCore pod. It also bundles the PersistentData module. Learn more about CocoaPods installation for iOS.
To install the DefaultStorage 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:
To access the persistentData API on the Tealium instance, add the following required import statement to your project:
The framework is auto-instantiated. It has a dependency on TealiumCore. It also bundles the PersistentData module. No additional import statements are necessary. Learn more about Carthage installation for iOS.
No additional variables are introduced by this module.
There are no public API methods for this module. Successes and failures may be monitored through the Delegate module.