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](https://files.readme.io/123447a-tealeaf-ios-installation-archive.png)
Step B: Add the files to your project
Here is how to add the debug version of the library to your app:
- Go to
SDK_Tools-master/SDKPackages/tealeaf/ios/EOCore/Debug/EOCore.xcframework
. Drag and drop the directory to your Xcode project.
![EOCore.xcframework directory](https://files.readme.io/26532db-debug-EOCore.png)
- Select the target(s) to add the files to.
![](https://files.readme.io/4990773-xcode-dialogue.png)
- Add the
SDKPackages/tealeaf/ios/Tealeaf/Debug/Tealeaf.xcframework
directory in the same way.
![Tealeaf.xcframework directory](https://files.readme.io/e2acee3-debug-tealeaf.png)
- 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 useTealeafMD5Hash.framework
instead, but never add both to the same project.
![TealeafSHA2Hash.xcframework directory](https://files.readme.io/e6508a4-debug-TealeafSHA2Hash.png)
- 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. - 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:
- In the project navigation, select the project node.
- Select a target and open the General tab.
- Under Frameworks, Libraries and Embedded Content, click to add a new framework.
- Add the frameworks one by one.
![Adding required frameworks](https://files.readme.io/036f416-add-frameworks.png)
- 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](https://files.readme.io/8cea11d-link-binary-with-libraries.png)
- 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.
Updated about 2 months ago