# iOS SDK

### **Initialize SDK**

The following guide provides steps to initialize the Conscent.ai SDK for your Xcode project. Please follow all the steps below carefully.

> Minimum iOS Version required is: 14

### Add Dependencies

Within the target block of your project's Podfile, define the Conscent.ai dependency.

```java
 target 'yourxcodeproject' do
         pod 'BluePine', '0.1.1'
end

```

Then, run the following command from the Terminal from the root of your Xcode project's directory to install the dependency.

```
pod install
```

If pod install fails for some reason, run pod update and pod repo update and try again.

### **Pair SDK with Dashboard**

Register Package Name

Open your Conscent.ai Dashboard and go to Settings > Basic Details and register a Package Name.

<figure><img src="https://380225236-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcoDfVWiJBvgTq8DbifIH%2Fuploads%2FCUSEOpp0hmgAsmxJ8OL8%2FScreenshot%202023-06-29%20at%202.22.52%20PM.png?alt=media&#x26;token=906c03c1-e562-4351-a325-cd78f7e64596" alt=""><figcaption></figcaption></figure>

### Set Package Name & Initialize SDK

Initialize the SDK anywhere in your project.

```java
import BluePine
   @main
   class AppDelegate: UIResponder, UIApplicationDelegate {
         func application(_ application: UIApplication,
   didFinishLaunchingWithOptions launchOptions:
   [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
...
                BluePine.setPartnerIdAndUserId(partnerId: "<partner_id>",
   userId: "<user_id>")
           BluePine.startBluePine()
   ...
} ... }
```

> 1. partner\_id details is available in settings page under basic details.
> 2. user\_id can be any string that will be shown in reports. This must be unique and cannot be changed for any User later on.
