Make sure Carthage is properly integrated into your Xcode project, so that the required frameworks are copied automatically at build-time.

Remember to strip simulator support as necessary before submitting to the App Store. You can avoid this step by using the “DeviceOnly” builds provided on the GitHub repo, which are also downloaded when using Carthage.

Manual

You can also add Tealium to your project manually following these steps:

Add TealiumIOS.framework to your project.

Copy framework to project in the resulting dialog box.

In the Target go to General > Embedded Binaries and add TealiumIOS.framework.

The log level is set by default from the publish settings from your iQ account. To overriide this setting set the logLevel property in the TEALConfiguration instance:

// Set the log verbosity to errors only
tealConfig.logLevel = .prod

// Set the log verbosity to maximum
[tealConfig setLogLevel: TEALLogLevelDev];

Track Views

Every time a user opens or changes a screen in the app a tracking call should be made. This is easily done in the viewDidAppear method of any View Controller. A view is tracked by calling trackViewWithTitle() with two parameters: the name of the screen and (optionally) contextual view data.

The screen name value will be populated in the event attribute named screen_title.

Samples & Documentation

Submit to the App Store

The mobile library contains slices which will permit running it in the simulator. Unfortunately, the simulator architecture is not allowed by Apple when submitting to the App Store. When creating your archive be sure to run one of the following two scripts to strip out the simulator: