The KochavaTracker iOS SDK allows advertisers to integrate a single SDK to leverage the hundreds of ad network and publisher partners integrated with Kochava. This limits the number of 3rd party SDKs required to run a successful UA strategy and greatly reduces complexity during update cycles.
- Xcode 8
- iOS 8.0
If you are still using an earlier version of Xcode, or want to support an earlier operating system version, you may consider using an earlier version of the iOS SDK.
See KochavaTracker iOS SDK Versions.
- Select your SDK variant.
- Add the SDK into your project.
- Download the zip file for the selected SDK.
- Extract the contents, and copy the included files into your project’s folder using Finder. You will typically want to add these files to the root folder of your project.
- Right-clicking on your project in Xcode, select “Add Files to (project name)” and the included files to your project.
- If you are working with multiple targets, you will want to ensure that you’ve included each of the included file(s) in the desired targets by selecting each file and reviewing its target membership in the inspector, which appears on the right side in Xcode.
- Ensure that the included static library (or framework) is included in Linked Frameworks and Libraries in your Project (located under General in Xcode 8). It will normally have been added at the moment you added the file to your target. If you are using an SDK which is distributed as a framework, you will need to include the framework in both the Embedded Binaries as well as Linked Frameworks and Libraries.
- Be aware that there are other frameworks that this SDK requires. With the current version of Xcode, and with the default build settings, you generally do not need to add these frameworks manually to your Linked Frameworks and Libraries. But if you’ve disabled automatic linking, then you may also need to add the following frameworks:
There are several different variants of the KochavaTracker iOS SDK, depending on host that it is being embedded within and its capabilities. For more information on current variants see KochavaTracker iOS SDK Version 3.1.2.
You have the option of downloading the SDK either using Cocoapods, or through the direct download of a zip file.
If you are using Cocoapods, add a pod to your Podfile providing the pod name for the selected SDK and the desired version. Example Podfile line(s):
pod 'Kochava', '~> 3.1.0'
Using a Zip File:
For GameKit aware SDKs, also:
The current KochavaTracker iOS SDK is natively written in Objective-C. In order to use it from Swift you must import the SDK’s main header file in the Objective-C Bridging Header File. If you do not already have a bridging header you will need to create one. Information on Swift/Objective-C bridging can be found here.
Using the SDK
Once an SDK has been integrated into your project, it’s time to make use of the included classes and resources.
The class KochavaTracker provides an interface between a host application and Kochava’s Attribution and Analytics Servers. A tracker manages the exchange of data between these two entities, along with the associated tasks and network transactions.
The class KochavaEvent provides a means of defining the parameters for a post-install event, providing standardized types and key names.