CocoaPods trunk is moving to be read-only. Read more on the blog, there are 17 months to go.
TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | Commercial |
ReleasedLast Release | Apr 2015 |
Maintained by Jason Koo.
Upgrading from an earlier version? See the Upgrade Notice
The frameworks included allow the native tagging of a mobile application once and then configuration of third-party analytic services remotely through Tealium IQ; all without needing to recode and redeploy an app for every update to these services.
First time implementations should read the How Tealium Works wiki page for a brief overview of how Tealium's SDK differs from conventional analytic SDKs. For any additional information, consult the wiki home page.
The remainder of this document provides quick install instructions for implementing the less memory intensive Compact library.
This guide presumes you have already created an iOS app using XCode. Follow the below steps to add Tealium's Compact library to it. Discussion on which version is ultimately best for you can be found in the What Next section.
onto your dev machine by clicking on the Clone to Desktop or Download ZIP buttons on the main repo page.
2a. From the ios-library/TealiumCompact folder, drag & drop the TealiumLibrary.framework(/tealiumcompact/tealiumlibrary.framework) into your XCode project's Navigation window.
2b. Click "Finish" in the resulting dialog box.
Link the following Apple frameworks to your project:
Your project-target-General tab should now look similar to:
Add the "-ObjC" linker flag to your project's Target-Build Settings:
5o1. Import the library into your project's .pch file into the following block:
#ifdef __OBJC__
//...
#import <TealiumLibrary/Tealium.h>
#endif
5o2. Init the library in your appDelegate.m class:
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
//...
[Tealium initSharedInstance:@"tealiummobile" profile:@"demo" target:@"dev"];
// (!) Don't forget to replace "tealiummobile", "demo" and "dev" with your own account-profile-target settings before creating your production build.
}
5s1. Import Tealium-bridging-header.h
5s2. Update Project’s Build Settings: Swift Compiler - Code Generation:
5s3. Add Init statement:
Tealium.initSharedInstance("tealiummobile", profile: "demo", target: "dev", options:TealiumOptions.TLNone, globalCustomData: nil)
Your app is now ready to compile and run. In the console output you should see a variation of:
2015-04-07 15:44:00.495 UICatalog_TealiumCompactLibrary[3771:1786056] TEALIUM 4.1.3c: Init settings: {
AccountInfo = {
Account = tealiummobile;
Profile = demo;
Target = dev;
};
Settings = {
AdditionalCustomData = {
};
ExcludeClasses = (
);
LogVerbosity = 1;
UseExceptionTracking = 1;
UseHTTPS = 1;
};
}
2015-04-07 15:44:00.496 UICatalog_TealiumCompactLibrary[3771:1786056] TEALIUM 4.1.3c: Initializing...
2015-04-07 15:44:00.687 UICatalog_TealiumCompactLibrary[3771:1786056] TEALIUM 4.1.3c: Adding new command: _push
2015-04-07 15:44:00.688 UICatalog_TealiumCompactLibrary[3771:1786056] TEALIUM 4.1.3c: Adding new command: _http
2015-04-07 15:44:00.691 UICatalog_TealiumCompactLibrary[3771:1786062] TEALIUM 4.1.3c: Network is available.
2015-04-07 15:44:00.735 UICatalog_TealiumCompactLibrary[3771:1786062] TEALIUM 4.1.3c: App Launch detected.
2015-04-07 15:44:00.762 UICatalog_TealiumCompactLibrary[3771:1786062] TEALIUM 4.1.3c: Queued auto link dispatch for TealiumLifecycle : launch : 2015-04-07T15:44:00. 1 dispatch queued.
2015-04-07 15:44:01.135 UICatalog_TealiumCompactLibrary[3771:1786035] TEALIUM 4.1.3c: Connection established with mobile.html at https://tags.tiqcdn.com/utag/tealiummobile/demo/dev/mobile.html?platform=iOS&os_version=8.2&library_version=4.1.3×tamp_unix=1428446640.
2015-04-07 15:44:01.328 UICatalog_TealiumCompactLibrary[3771:1786054] TEALIUM 4.1.3c: UTAG found in mobile.html: true
2015-04-07 15:44:01.328 UICatalog_TealiumCompactLibrary[3771:1786054] TEALIUM 4.1.3c: Initialized.
2015-04-07 15:44:01.669 UICatalog_TealiumCompactLibrary[3771:1786054] TEALIUM 4.1.3c: UIAutotracking: ON (ignoring)
2015-04-07 15:44:01.670 UICatalog_TealiumCompactLibrary[3771:1786054] TEALIUM 4.1.3c: IVar Tracking: ON (ignoring)
2015-04-07 15:44:01.670 UICatalog_TealiumCompactLibrary[3771:1786054] TEALIUM 4.1.3c: Batch limit: 1
2015-04-07 15:44:01.671 UICatalog_TealiumCompactLibrary[3771:1786054] TEALIUM 4.1.3c: Wifi sending only: OFF
2015-04-07 15:44:01.671 UICatalog_TealiumCompactLibrary[3771:1786054] TEALIUM 4.1.3c: Battery save feature: ON
2015-04-07 15:44:01.672 UICatalog_TealiumCompactLibrary[3771:1786054] TEALIUM 4.1.3c: Offline dispatch cache: -1
2015-04-07 15:44:01.672 UICatalog_TealiumCompactLibrary[3771:1786054] TEALIUM 4.1.3c: Queued dispatch expiration: -1
2015-04-07 15:44:01.673 UICatalog_TealiumCompactLibrary[3771:1786054] TEALIUM 4.1.3c: Mobile Companion: ON (ignoring)
2015-04-07 15:44:01.674 UICatalog_TealiumCompactLibrary[3771:1786054] TEALIUM 4.1.3c: Sending 1 queued dispatch.
2015-04-07 15:44:01.737 UICatalog_TealiumCompactLibrary[3771:1786054] TEALIUM 4.1.3c: Successfully packaged auto link dispatch for TealiumLifecycle : launch : 2015-04-07T15:44:00
Congratulations! You have successfully implemented the Tealium Compact library into your project.
If you have disabled internet connectivity to test offline caching, you will see a variation of:
2015-04-07 15:45:57.407 UICatalog_TealiumCompactLibrary[3779:1786965] TEALIUM 4.1.3c: Init settings: {
AccountInfo = {
Account = tealiummobile;
Profile = demo;
Target = dev;
};
Settings = {
AdditionalCustomData = {
};
ExcludeClasses = (
);
LogVerbosity = 1;
UseExceptionTracking = 1;
UseHTTPS = 1;
};
}
2015-04-07 15:45:57.408 UICatalog_TealiumCompactLibrary[3779:1786965] TEALIUM 4.1.3c: Initializing...
2015-04-07 15:45:57.627 UICatalog_TealiumCompactLibrary[3779:1786965] TEALIUM 4.1.3c: Adding new command: _push
2015-04-07 15:45:57.628 UICatalog_TealiumCompactLibrary[3779:1786965] TEALIUM 4.1.3c: Adding new command: _http
2015-04-07 15:45:57.632 UICatalog_TealiumCompactLibrary[3779:1786965] TEALIUM 4.1.3c: Network is not available.
2015-04-07 15:45:57.719 UICatalog_TealiumCompactLibrary[3779:1786967] TEALIUM 4.1.3c: NO INTERNET connection detected.
2015-04-07 15:45:57.719 UICatalog_TealiumCompactLibrary[3779:1786967] TEALIUM 4.1.3c: Trying to reconnect (attempt 1 of 3)...
2015-04-07 15:45:58.841 UICatalog_TealiumCompactLibrary[3779:1786963] TEALIUM 4.1.3c: NO INTERNET connection detected.
2015-04-07 15:45:58.842 UICatalog_TealiumCompactLibrary[3779:1786963] TEALIUM 4.1.3c: Trying to reconnect (attempt 2 of 3)...
2015-04-07 15:45:59.963 UICatalog_TealiumCompactLibrary[3779:1786968] TEALIUM 4.1.3c: NO INTERNET connection detected.
2015-04-07 15:45:59.964 UICatalog_TealiumCompactLibrary[3779:1786968] TEALIUM 4.1.3c: Trying to reconnect (attempt 3 of 3)...
2015-04-07 15:46:01.082 UICatalog_TealiumCompactLibrary[3779:1786967] TEALIUM 4.1.3c: NO INTERNET connection detected.
2015-04-07 15:46:01.084 UICatalog_TealiumCompactLibrary[3779:1786967] TEALIUM 4.1.3c: Saved configuration loaded: true
2015-04-07 15:46:01.085 UICatalog_TealiumCompactLibrary[3779:1786967] TEALIUM 4.1.3c: No new configuration data found from mobile.html. Library will continue running with last saved configuration.
2015-04-07 15:46:01.086 UICatalog_TealiumCompactLibrary[3779:1786967] TEALIUM 4.1.3c: UIAutotracking: ON (ignoring)
2015-04-07 15:46:01.086 UICatalog_TealiumCompactLibrary[3779:1786967] TEALIUM 4.1.3c: IVar Tracking: ON (ignoring)
2015-04-07 15:46:01.087 UICatalog_TealiumCompactLibrary[3779:1786967] TEALIUM 4.1.3c: Batch limit: 1
2015-04-07 15:46:01.088 UICatalog_TealiumCompactLibrary[3779:1786967] TEALIUM 4.1.3c: Wifi sending only: OFF
2015-04-07 15:46:01.089 UICatalog_TealiumCompactLibrary[3779:1786967] TEALIUM 4.1.3c: Battery save feature: ON
2015-04-07 15:46:01.089 UICatalog_TealiumCompactLibrary[3779:1786967] TEALIUM 4.1.3c: Offline dispatch cache: -1
2015-04-07 15:46:01.090 UICatalog_TealiumCompactLibrary[3779:1786967] TEALIUM 4.1.3c: Queued dispatch expiration: -1
2015-04-07 15:46:01.090 UICatalog_TealiumCompactLibrary[3779:1786967] TEALIUM 4.1.3c: Mobile Companion: ON (ignoring)
2015-04-07 15:46:01.090 UICatalog_TealiumCompactLibrary[3779:1786967] TEALIUM 4.1.3c: Initialized.
2015-04-07 15:46:01.091 UICatalog_TealiumCompactLibrary[3779:1786967] TEALIUM 4.1.3c: App Launch detected.
2015-04-07 15:46:01.154 UICatalog_TealiumCompactLibrary[3779:1786967] TEALIUM 4.1.3c: Queued auto link dispatch for TealiumLifecycle : launch : 2015-04-07T15:46:01. 1 dispatch queued.
The two recommended methods for dispatch verification are:
AudienceStream live events provides real time visualization of dispatched data if the Tealium DataCloud Tag has been added the same TIQ account-profile used to init the library:
An analytic vendor with real time processing, such as Google Analytics), can also be used to verify dispatches if the data sources have been properly mapped to the target vendors' variables.
Note: vendors without real-time processing may take up to several hours to update their reporting.
Now that you've successfully integrated the library, you should now determine if the Compact or Full Library versions best fit your needs. Below are the key differences:
Compact | Full | |
---|---|---|
Library Compile Size | ~600 KB | ~900 KB |
Initialization Time | +<1 ms | +<1 ms |
Runtime Memory Usage | +3.3 MB | +5.0 MB |
Custom Data Tracking | Yes | Yes |
Device Data Tracking | Yes | Yes |
Lifecycle Tracking | Yes | Yes |
Offline Tracking | Yes | Yes |
Tag Bridge | Yes | Yes |
Timestamp Tracking | Yes | Yes |
AudienceStream Trace | No | Yes |
Mobile Companion | No | Yes |
UI Autotracking | No | Yes |
Video Tracking | No | Yes |
(A) Continue with the Compact version, add any needed additional tracking calls for events or view appearances.
(B) Switch to the Full version, see our Basic Implementation Guide, paying attention to the additional setup requirements.
Still can't decide? Browse through our wiki pages for more info, or read a few mobile related posts in the TealiumIQ Community (consult your Tealium Account Manager for access).
Questions or comments?
<TealiumLibrary/Tealium.h>
Copyright (C) 2012-2015, Tealium Inc.