> For the complete documentation index, see [llms.txt](https://docs.mitter.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mitter.io/sdks/ios/get-the-current-user-details.md).

# Get the current user details

Now, go to your main `ViewController` which is the `ViewController.swift` file under your project.

Inside the `viewDidLoad()` function, get a reference to your `AppDelegate` instance by adding the following line:

```
let appDelegate = UIApplication.shared.delegate as! AppDelegate
```

Now, you can easily make a call to Mitter and see the currently authenticated user details by calling the `getCurrentUsers()` function on the `Mitter.Users` object.

This can be done like this:

```
                appDelegate.mitter.users.getCurrentUser {
                    result in
                    switch result {
                    case .success(let user):
                        print("Current User is: \(user)")
                    case .error:
                        print("Unable to get user!")
                    }
                }
```

Now, press `⌘R` to run your project in any iPhone simulator.

If everything’s setup according to the previous steps, you should be able to see the currently authenticated user details printed to your console log inside Xcode.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/sdks/ios/get-the-current-user-details.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.
