> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zixflow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Initialize the SDK and send your first event with iOS.

### UIKit Apps

For UIKit-based applications with AppDelegate:

#### 1. Initialize in AppDelegate

```swift theme={null}
import UIKit
import ZixflowDataPipelines
import ZixflowMessagingPushAPN

@main
class AppDelegate: UIResponder, UIApplicationDelegate {

    func application(
        _ application: UIApplication,
        didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
    ) -> Bool {
        // Initialize Zixflow SDK
        initializeZixflow()
        return true
    }

    func initializeZixflow() {
        // Configure the SDK
        let config = SDKConfigBuilder(apiKey: "YOUR_API_KEY")

            .autoTrackDeviceAttributes(true)          // Auto-track device info
            .trackApplicationLifecycleEvents(true)    // Track app lifecycle
            .logLevel(.debug)                         // Set log level
            .build()

        // Initialize core SDK
        Zixflow.initialize(withConfig: config)

        // Initialize push notifications (optional)
        MessagingPushAPN.initialize(
            withConfig: MessagingPushConfigBuilder()
                .autoFetchDeviceToken(true)
                .autoTrackPushEvents(true)
                .showPushAppInForeground(true)
                .build()
        )
    }
}
```

#### 2. Replace Configuration Values

* **YOUR\_API\_KEY**: Your Zixflow API key (from Zixflow dashboard)

***

### SwiftUI Apps

For SwiftUI applications with `@main` App struct:

#### 1. Create AppDelegate Class

```swift theme={null}
import UIKit
import ZixflowDataPipelines
import ZixflowMessagingPushAPN

class AppDelegate: NSObject, UIApplicationDelegate {
    func application(
        _ application: UIApplication,
        didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil
    ) -> Bool {
        // Configure the SDK
        let config = SDKConfigBuilder(apiKey: "YOUR_API_KEY")

            .autoTrackDeviceAttributes(true)
            .trackApplicationLifecycleEvents(true)
            .logLevel(.debug)
            .build()

        Zixflow.initialize(withConfig: config)

        // Initialize messaging features
        MessagingPushAPN.initialize(
            withConfig: MessagingPushConfigBuilder()
                .autoFetchDeviceToken(true)
                .autoTrackPushEvents(true)
                .showPushAppInForeground(true)
                .build()
        )

        return true
    }
}
```

#### 2. Connect AppDelegate to SwiftUI App

```swift theme={null}
import SwiftUI

@main
struct YourApp: App {
    @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate

    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}
```

***
