--- title: "Initialize the SDK" slug: "mapp-intelligence-ios-sdk-v5-initialize-sdk" updated: 2026-04-30T11:53:57Z published: 2026-04-30T11:53:57Z canonical: "docs.mapp.com/mapp-intelligence-ios-sdk-v5-initialize-sdk" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.mapp.com/llms.txt > Use this file to discover all available pages before exploring further. # Initialize the SDK ## What initialization means Initialization is the step where you pass at least one Track ID and a valid Track Domain to `MappIntelligence.shared()?.initWithConfiguration(...)`. From this point on, the SDK is available to the rest of your app. --- ## Where initialization should happen Initialize the SDK once during app startup: - In a UIKit app: in your `AppDelegate`'s `application(_:didFinishLaunchingWithOptions:)`. - In a SwiftUI app: in the `init()` of your `@main App` struct, or in an `UIApplicationDelegateAdaptor`. > [!NOTE] > This follows common iOS startup practice for app-wide libraries: initialize them once at app launch, not lazily from individual screens. > [!WARNING] > **Note:** watchOS and tvOS are no longer supported (sunset with version 5.0.6, December 2023). The SDK targets iOS (and iPadOS) only. --- ## Minimum required configuration You must provide: - at least one **Track ID** - a valid **Track Domain** (HTTPS) --- ## Example **Swift** **UIKit (AppDelegate):** ```swift import UIKit import MappIntelligence @main class AppDelegate: UIResponder, UIApplicationDelegate {    func application(        _ application: UIApplication,        didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?    ) -> Bool {        MappIntelligence.shared()?.initWithConfiguration(            [123451234512345],            onTrackdomain: "https://your-trackdomain.com"        )        return true    } } ``` **SwiftUI (App lifecycle):** ```swift import SwiftUI import MappIntelligence @main struct MyApp: App {    init() {        MappIntelligence.shared()?.initWithConfiguration(            [123451234512345],            onTrackdomain: "https://your-trackdomain.com"        )    }    var body: some Scene {        WindowGroup { ContentView() }    } } ``` **Objective-C** ```objectivec #import "AppDelegate.h" #import @implementation AppDelegate - (BOOL)application:(UIApplication *)application    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    [[MappIntelligence shared]        initWithConfiguration:@[@123451234512345]                onTrackdomain:@"https://your-trackdomain.com"];    return YES; } @end ``` --- ## What to verify after initialization - the app starts without errors - your Track ID and Track Domain values are correct - the Track Domain uses `https://` - the initialization code runs exactly once during app startup --- ## What not to overload into this step Keep initialization minimal. Logging, request interval, batch support, user matching, crash tracking, and other optional behavior should be set in [Configure Global Tracking](/v1/docs/mapp-intelligence-ios-sdk-v5-configure-global-tracking). --- ## Next step Once the SDK starts successfully, continue with [Configure Global Tracking](/v1/docs/mapp-intelligence-ios-sdk-v5-configure-global-tracking). > [!WARNING] > If the SDK is not initialized correctly, later SDK calls can fail because the required configuration is missing. --- ## Related - [Quickstart](/v1/docs/mapp-intelligence-ios-sdk-v5-quickstart) - [Add the SDK Dependency](/v1/docs/mapp-intelligence-ios-sdk-v5-add-sdk-dependency) - [Configure Global Tracking](/v1/docs/mapp-intelligence-ios-sdk-v5-configure-global-tracking) - [No Tracking Data Visible](/v1/docs/mapp-intelligence-ios-sdk-v5-no-tracking-data-visible) Track IDs are used to assign requests to an account. You find the track ID under *Mapp Q3 >**Configuration > System Configuration > Data Collection.* If the same information is to be recorded for multiple accounts, you can enter the corresponding Track IDs of the accounts comma-separated. Specify your Mapp Intelligence track domain. This information is provided by your account manager.