Manually integrate the Tealeaf SDK into your iOS app

We recommend installing the Tealeaf iOS SDK using dependency managers. This is faster and easier than downloading the files from GitHub and adding them to your Xcode project. However, in some cases a manual integration may be preferable.

Step A: Download the files

To get started, download the latest version of the SDK from our GitHub repository. Unpack the installation archive (SDK_Tools-master) and navigate to the SDKPackages/tealeaf/ios folder. You will need the following subfolders:

  • EOCore – Contains static debug and release of the base library that Tealeaf needs to communicate with the server.
  • Tealeaf – Contains static debug and release of the library that collects Tealeaf data passed to EOCore.
  • TLFImageTool - Extracts local image resources and generates .png assets for the replay server.
Tealeaf iOS installation archive

Step B: Add the files to your project

Here is how to add the debug version of the library to your app:

  1. Go to SDK_Tools-master/SDKPackages/tealeaf/ios/EOCore/Debug/EOCore.xcframework. Drag and drop the directory to your Xcode project.
EOCore.xcframework directory
  1. Select the target(s) to add the files to.
  1. Add the SDKPackages/tealeaf/ios/Tealeaf/Debug/Tealeaf.xcframework directory in the same way.
Tealeaf.xcframework directory
  1. Optionally, add the SDK_Tools-master/SDKPackages/tealeaf/ios/TealeafSHA2Hash/Debug/TealeafSHA2Hash.xcframework directory in the same way. This will add a hashing library for computing unique IDs. You can use TealeafMD5Hash.framework instead, but never add both to the same project.
TealeafSHA2Hash.xcframework directory
  1. Select SDKPackages/tealeaf/ios/EOCore/Debug. Drag and drop EOCoreSettings.bundle to your project. This bundle will also be added in the Target > Build Phases > Copy Bundle Resources section. If it is not added there, you can add it.
  2. Select SDKPackages/tealeaf/ios/Tealeaf/Debug. Drag and drop TLFResources.bundle to your project. This bundle will also be added in the Target > Build Phases > Copy Bundle Resources section. If it is not added there, you can add it.

📘

Note

Want to use the release version of the library? Change Debug to Release in the file paths.

Step C: Add required frameworks

The iOS logging framework requires these frameworks:

  • CFNetwork.framework
  • CoreGraphics.framework
  • CoreLocation.framework
  • CoreTelephony.framework
  • Foundation.framework
  • SystemConfiguration.framework
  • UIKit.framework
  • WebKit.framework

To add these frameworks to your Xcode project, complete the following steps:

  1. In the project navigation, select the project node.
  2. Select a target and open the General tab.
  3. Under Frameworks, Libraries and Embedded Content, click to add a new framework.
  4. Add the frameworks one by one.
Adding required frameworks
  1. On the Build Phases tab, expand the Link Binary With Libraries section. You will see the frameworks that you have just added.
Link binary with libraries
  1. Drag and drop three more libraries there from the project navigation: EOCore.framework, Tealeaf.framework and - optionally - TealeafSHA2Hash.framework or TealeafMD5Hash.framework.

🚧

Important

All of these libraries must be listed before any Apple libraries, for example, the SystemConfiguration.framework or UIKit.framework libraries. If an additional library is listed after the Apple libraries, your application might not pass the App Store approval process.

Further steps

To complete the integration, please follow the primary integration instruction.