It is important that you configure the SDK with your API Key as soon as the app launches.

API Key

If you haven’t already, sign up for a free account on UserKit. Once logged in, click on your app name in the top left, then click Settings and copy your API Key:

Initialize UserKit

// AppDelegate.swift

import UIKit
import UserKit

@main
final class AppDelegate: UIResponder, UIApplicationDelegate {
  func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    UserKit.configure(apiKey: "YOUR_API_KEY") // Replace this with your API Key
    return true
  }
}
This configures a shared instance of UserKit, the primary class for interacting with the SDK’s API. Make sure to replace YOUR_API_KEY with your API key that you just retrieved.
Nicely done! The last thing to do now is identify your users then you are ready to make calls.