> For the complete documentation index, see [llms.txt](https://cramiumlabs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cramiumlabs.gitbook.io/docs/sdk-mpc-ios/importing-and-initializing.md).

# Importing and Initializing

#### **Import the Framework**

Add the following line at the top of any Swift file where you want to use the SDK:

```swift
import Mpc
```

#### **Initialize the SDK**

Initialize the SDK in AppDelegate.swift or SceneDelegate.swift, depending on your project setup.

```swift
import UIKit
import Mpc

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
    func application(_ application: UIApplication,
                     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        // Get the window from the first connected scene
        guard let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
              let window = windowScene.windows.first else {
            fatalError("No window found")
        }
        
        let passkey = PasskeyClientImpl(
            window: window,
            apiKey: "API_KEY",
            authServerAddress: "AUTH_SERVER_ADDRESS"
        )
        let client = MpcClient(
            "YOUR_SERVER_ADDRESS", 
            "YOUR_TOKEN",
            "YOUR_MODE",
            "AUTH_SERVER_ADDRESS",
            "MAIN_SERVER_ADDRESS",
            passkey
        )
        client.initClient()
    }
}
```
