# Setup

This page will help you with setting up the Mobile SDK in your application.

# Step 1 - Smartsuppp Key

You'll receive an e-mail with your unique code immediately after the sign up. It can also be found in Settings > Chat box > Chat code (opens new window).

# Step 2 - Get API Key

To get the API key, contact our sales team (opens new window).

# Step 3 - Initialize Mobile SDK

# UIKit

Call the setup method inside of application(_:didFinishLaunchingWithOptions:) of your AppDelegate:

Smartsupp.setup(
    withOptions: .init(
        apiKey: "YOUR_API_KEY",
        accountKey: "YOUR_ACCOUNT_KEY"
    )
)

# SwiftUI

Call the setup method inside ofinit() of your main app structure and add the .smartsupp() view modifier to the top view of your app:

@main
struct MyApp: App {
    init() {
        Smartsupp.setup(
            withOptions: .init(
                apiKey: "YOUR_API_KEY",
                accountKey: "YOUR_ACCOUNT_KEY"
            )
        )
    }

    var body: some Scene {
        WindowGroup {
            ContentView()
                .smartsupp()
        }
    }
}

DANGER

Don't forget to add the .smartsupp() view modifier, otherwise the SDK won't be able to present the Widget.