iOS SDK

Setting up the Conscent.ai SDK (Loyalty Platform) in your Xcode project

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.

 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.

Set Package Name & Initialize SDK

Initialize the SDK anywhere in your project.

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.

Last updated