SDK
HomePromoteAnalyzeDevelopResources
4.5.0
4.5.0
  • SDK Overview
    • Tracking Documentation
      • Android
      • iOS & SKAdNetwork
      • Retargeting
    • Predefined Events
    • Find your justtrack token
  • Android
    • Overview
      • Retargeting users
      • Revenue
      • UserEvent API
      • Demo
      • Changelog
    • Set up the SDK
    • Send user events
    • Get the justtrack user ID
    • Get an attribution
    • Get an advertiser and test group ID
    • Integrate third-party SDKs
  • iOS
    • Overview
      • Track sessions
      • UserEvent API
      • Changelog
    • Set up the SDK
    • Send user events
    • Get the justtrack user ID
    • Get an attribution
    • Get an advertiser and test group ID
    • Integrate third-party SDKs
    • Request tracking authorization
  • Unity
    • Overview
      • Forward Ad Impressions
      • UserEvent API
      • Changelog
    • Install the SDK
    • Install the dependencies
    • Add the prefab
    • Send user events
    • Get a justtrack user ID
    • Get an attribution
    • Get an advertiser and test group Id
    • Provide your own user Id
    • Integrate third-party SDKs
    • Forward in-app purchases
    • Get an affiliate link
    • Configure your iOS application
Powered by GitBook
On this page
  • Add the SDK
  • Copy your API Token
  • Instantiate the SDK
  1. iOS

Set up the SDK

Last updated 1 year ago

The justtrack SDK offers extensive tracking capabilities for attribution, events, and various other functionalities within your iOS application. In this guide, you'll learn to:

  • Add the justtrack SDK to your app

  • Copy your API token

  • Instantiate a JustTrackSdk object

  • Shutdown the SDK instance

Add the SDK

CocoaPods

You can use to add the justtrack SDK to your app. Add the following line to your Podfile:

pod 'JustTrackSDK', '4.5.0'

Afterwards, run pod install in your project to actually download and install the justtrack SDK for your project.

We support Xcode version 14.0 and later.

Copy your API Token

Before integrating the justtrack SDK into your app, you need to obtain an API token. Follow our guide to .

Instantiate the SDK

The SDK consists of a handful of (public) classes and protocols you can interact with. The main protocol of these is JustTrackSdk which allows you to attribute the current user, send notifications to the backend or record user events. To create an instance of the SDK you have to invoke the JustTrackSdkBuilder class. Instantiating the SDK could look like this:

do {
    let sdk = try JustTrackSdkBuilder(apiToken: "prod-...").build()
} catch {
    // apiToken has invalid format...
}
CocoaPods
find your token