# Basic Setup

Before you can start communicating with Mitter using the SDK, it needs to be configured with your **application ID** and **user auth token**.

The best place to configure a global `Mitter` object is inside your `AppDelegate.swift` file.

Open up the `AppDelegate` file and declare an instance field for the `Mitter` object, like this:

```
var mitter: Mitter = Mitter(applicationId: "")
```

After you’ve done that, locate the function with `didFinishLaunchingWithOptions` signature and initialise your `Mitter` object with your application and user details like this:

```
mitter = Mitter(
            applicationId: "MZzf4-na9nL-O98wq-M1HxS",
            userAuthToken: "eyJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJtaXR0ZXItaW8iLCJ1c2VyVG9rZW5JZCI6IkhYbkZJSXIydUpQRHMzankiLCJ1c2VydG9rZW4iOiJhaHFtNTgzcjRwbzEwZmNqZTllaHE5dDV1NCIsImFwcGxpY2F0aW9uSWQiOiJNWnpmNC1uYTluTC1POTh3cS1NMUh4UyIsInVzZXJJZCI6ImNzckN5LVNKTDN1LThBS01ULVdxdjZ5In0.FTgn0GBgIQrA0NznQEUHyC7SN7rbN9O9cWlI5mejuDG466VSJHjwGWZF2DB3nsn8eoeCg5toIXXh5Sxz2MMU3w"
)
```

The user token is enough to help the SDK figure out the user ID. Therefore, you don’t need to explicitly add the user ID. You can get the application id and token from the [mitter.io dashboard](https://mitter.io/home).

#### Using the SDK with containerised Mitter.io

If you're using the Mitter.io docker container, then you need to *override* the default API endpoint in the SDK, as follows:

```
mitter = Mitter(
            applicationId: "MZzf4-na9nL-O98wq-M1HxS",
            userAuthToken: "eyJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJtaXR0ZXItaW8iLCJ1c2VyVG9rZW5JZCI6IkhYbkZJSXIydUpQRHMzankiLCJ1c2VydG9rZW4iOiJhaHFtNTgzcjRwbzEwZmNqZTllaHE5dDV1NCIsImFwcGxpY2F0aW9uSWQiOiJNWnpmNC1uYTluTC1POTh3cS1NMUh4UyIsInVzZXJJZCI6ImNzckN5LVNKTDN1LThBS01ULVdxdjZ5In0.FTgn0GBgIQrA0NznQEUHyC7SN7rbN9O9cWlI5mejuDG466VSJHjwGWZF2DB3nsn8eoeCg5toIXXh5Sxz2MMU3w",
            mitterApiEndpoint: "http://localhost:11901"
)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mitter.io/getting-started/build-your-first-ios-app/basic-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
