# 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="/files/7UpYxnZqApMn68HDmhkB" 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.


---

# 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.conscent.ai/loyalty-system/ios-sdk.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.
