TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | Custom |
ReleasedLast Release | Oct 2015 |
Maintained by David Cordero.
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-05-28 10:06:21.078 UICatalog_TealiumCompactLibrary[1208:1724453] TEALIUM 4.1.8c: Init settings: {
AccountInfo = {
Account = tealiummobile;
Profile = demo;
Target = dev;
};
Settings = {
AdditionalCustomData = {
};
ExcludeClasses = (
);
LogVerbosity = 1;
UseExceptionTracking = 1;
UseHTTPS = 1;
};
}
2015-05-28 10:06:21.083 UICatalog_TealiumCompactLibrary[1208:1724453] TEALIUM 4.1.8c: Initializing...
2015-05-28 10:06:22.294 UICatalog_TealiumCompactLibrary[1208:1724453] TEALIUM 4.1.8c: Adding new command: _push
2015-05-28 10:06:22.294 UICatalog_TealiumCompactLibrary[1208:1724453] TEALIUM 4.1.8c: Adding new command: _http
2015-05-28 10:06:22.305 UICatalog_TealiumCompactLibrary[1208:1724453] TEALIUM 4.1.8c: App Launch detected.
2015-05-28 10:06:22.360 UICatalog_TealiumCompactLibrary[1208:1724453] TEALIUM 4.1.8c: Queued auto link dispatch for TealiumLifecycle : launch : 2015-05-28T10:06:22. 1 dispatch queued.
2015-05-28 10:06:22.469 UICatalog_TealiumCompactLibrary[1208:1724453] TEALIUM 4.1.8c: Network is available.
2015-05-28 10:06:22.624 UICatalog_TealiumCompactLibrary[1208:1724372] TEALIUM 4.1.8c: Connection established with mobile.html at https://tags.tiqcdn.com/utag/tealiummobile/demo/dev/mobile.html?platform=iOS&os_version=8.3&library_version=4.1.8c×tamp_unix=1432832782.
2015-05-28 10:06:23.938 UICatalog_TealiumCompactLibrary[1208:1724453] TEALIUM 4.1.8c: UTAG found in mobile.html: true
2015-05-28 10:06:23.939 UICatalog_TealiumCompactLibrary[1208:1724453] TEALIUM 4.1.8c: Initialized.
2015-05-28 10:06:24.028 UICatalog_TealiumCompactLibrary[1208:1724453] TEALIUM 4.1.8c: UIAutotracking: ON (ignoring)
2015-05-28 10:06:24.029 UICatalog_TealiumCompactLibrary[1208:1724453] TEALIUM 4.1.8c: IVar Tracking: ON (ignoring)
2015-05-28 10:06:24.029 UICatalog_TealiumCompactLibrary[1208:1724453] TEALIUM 4.1.8c: Batch limit: 1
2015-05-28 10:06:24.029 UICatalog_TealiumCompactLibrary[1208:1724453] TEALIUM 4.1.8c: Wifi sending only: OFF
2015-05-28 10:06:24.030 UICatalog_TealiumCompactLibrary[1208:1724453] TEALIUM 4.1.8c: Battery save feature: ON
2015-05-28 10:06:24.030 UICatalog_TealiumCompactLibrary[1208:1724453] TEALIUM 4.1.8c: Offline dispatch cache: -1
2015-05-28 10:06:24.030 UICatalog_TealiumCompactLibrary[1208:1724453] TEALIUM 4.1.8c: Queued dispatch expiration: -1
2015-05-28 10:06:24.031 UICatalog_TealiumCompactLibrary[1208:1724453] TEALIUM 4.1.8c: Mobile Companion: ON (ignoring)
2015-05-28 10:06:24.031 UICatalog_TealiumCompactLibrary[1208:1724453] TEALIUM 4.1.8c: Sending 1 queued dispatch.
2015-05-28 10:06:24.075 UICatalog_TealiumCompactLibrary[1208:1724453] TEALIUM 4.1.8c: Successfully packaged auto link dispatch for TealiumLifecycle : launch : 2015-05-28T10:06:22
2015-05-28 10:06:24.339 UICatalog_TealiumCompactLibrary[1208:1724479] TEALIUM 4.1.8c: Finished running dispatch queue with 0 remaining dispatches.
2015-05-28 10:06:24.626 UICatalog_TealiumCompactLibrary[1208:1724482] TEALIUM 4.1.8c: Registering device for remote push notifications...
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-05-28 10:08:12.519 UICatalog_TealiumCompactLibrary[1214:1725071] TEALIUM 4.1.8c: Init settings: {
AccountInfo = {
Account = tealiummobile;
Profile = demo;
Target = dev;
};
Settings = {
AdditionalCustomData = {
};
ExcludeClasses = (
);
LogVerbosity = 1;
UseExceptionTracking = 1;
UseHTTPS = 1;
};
}
2015-05-28 10:08:12.522 UICatalog_TealiumCompactLibrary[1214:1725071] TEALIUM 4.1.8c: Initializing...
2015-05-28 10:08:12.785 UICatalog_TealiumCompactLibrary[1214:1725071] TEALIUM 4.1.8c: Adding new command: _push
2015-05-28 10:08:12.785 UICatalog_TealiumCompactLibrary[1214:1725071] TEALIUM 4.1.8c: Adding new command: _http
2015-05-28 10:08:12.794 UICatalog_TealiumCompactLibrary[1214:1725071] TEALIUM 4.1.8c: Network is not available.
2015-05-28 10:08:12.795 UICatalog_TealiumCompactLibrary[1214:1725071] TEALIUM 4.1.8c: App Launch detected.
2015-05-28 10:08:12.851 UICatalog_TealiumCompactLibrary[1214:1725071] TEALIUM 4.1.8c: Queued auto link dispatch for TealiumLifecycle : launch : 2015-05-28T10:08:12. 1 dispatch queued.
2015-05-28 10:08:12.885 UICatalog_TealiumCompactLibrary[1214:1725071] TEALIUM 4.1.8c: NO INTERNET connection detected.
2015-05-28 10:08:12.885 UICatalog_TealiumCompactLibrary[1214:1725071] TEALIUM 4.1.8c: Trying to reconnect (attempt 1 of 3)...
2015-05-28 10:08:13.959 UICatalog_TealiumCompactLibrary[1214:1725072] TEALIUM 4.1.8c: NO INTERNET connection detected.
2015-05-28 10:08:13.960 UICatalog_TealiumCompactLibrary[1214:1725072] TEALIUM 4.1.8c: Trying to reconnect (attempt 2 of 3)...
2015-05-28 10:08:14.975 UICatalog_TealiumCompactLibrary[1214:1725072] TEALIUM 4.1.8c: NO INTERNET connection detected.
2015-05-28 10:08:14.976 UICatalog_TealiumCompactLibrary[1214:1725072] TEALIUM 4.1.8c: Trying to reconnect (attempt 3 of 3)...
2015-05-28 10:08:15.991 UICatalog_TealiumCompactLibrary[1214:1725067] TEALIUM 4.1.8c: NO INTERNET connection detected.
2015-05-28 10:08:15.992 UICatalog_TealiumCompactLibrary[1214:1725072] TEALIUM 4.1.8c: Saved configuration loaded: true
2015-05-28 10:08:15.992 UICatalog_TealiumCompactLibrary[1214:1725072] TEALIUM 4.1.8c: No new configuration data found from mobile.html. Library will continue running with last saved configuration.
2015-05-28 10:08:15.993 UICatalog_TealiumCompactLibrary[1214:1725072] TEALIUM 4.1.8c: UIAutotracking: ON (ignoring)
2015-05-28 10:08:15.993 UICatalog_TealiumCompactLibrary[1214:1725072] TEALIUM 4.1.8c: IVar Tracking: ON (ignoring)
2015-05-28 10:08:15.993 UICatalog_TealiumCompactLibrary[1214:1725072] TEALIUM 4.1.8c: Batch limit: 1
2015-05-28 10:08:15.994 UICatalog_TealiumCompactLibrary[1214:1725072] TEALIUM 4.1.8c: Wifi sending only: OFF
2015-05-28 10:08:15.994 UICatalog_TealiumCompactLibrary[1214:1725072] TEALIUM 4.1.8c: Battery save feature: ON
2015-05-28 10:08:15.996 UICatalog_TealiumCompactLibrary[1214:1725072] TEALIUM 4.1.8c: Offline dispatch cache: -1
2015-05-28 10:08:15.996 UICatalog_TealiumCompactLibrary[1214:1725072] TEALIUM 4.1.8c: Queued dispatch expiration: -1
2015-05-28 10:08:15.997 UICatalog_TealiumCompactLibrary[1214:1725072] TEALIUM 4.1.8c: Mobile Companion: ON (ignoring)
2015-05-28 10:08:15.997 UICatalog_TealiumCompactLibrary[1214:1725072] TEALIUM 4.1.8c: Initialized.
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.