Related Articles

Install the new software development kit (SDK) that will enable you to create an application for the iOS platform.

Create a new iOS SDK


Paldesk SDK supports iOS 9+ and Swift 4.2.


Currently, only Carthage is supported. Add github “paldesk/paldesk-ios-sdk” to your Cartfile and run carthage

update –platform ios

Drag the frameworks (Paldesk, ReSwift, SocketIO, Starscream, Kingfisher and Alamofire from Carthage/Build) to Linked Frameworks and Libraries section.


1.Add new Run Script phase in Build Phases and add:

  /usr/local/bin/carthage copy-frameworks

2. Input files:







3. Output files:







4. Add NSPhotoLibraryUsageDescription to your Info.plist. It’s needed for uploading images.


Initialize Paldesk with your Api Key in app delegate:

// Swift

import Paldesk

   func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

       // Override point for customization after application launch.


       PaldeskSDK.initialize(apiKey: “Your Api Key”)

       return true


// Objective-C

#import <Paldesk/Paldesk.h>

– (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

   // Override point for customization after application launch.

   [PaldeskSDK initializeWithApiKey:@”Your Api Key”];

   return YES;


If you wish to enable logging, just add “loggingEnabled” parameter to initialize method:

// Swift

   PaldeskSDK.initialize(apiKey: “Your Api Key”, loggingEnabled: true)

// Objective-C

   [PaldeskSDK initializeWithApiKey:@”Your Api Key” loggingEnabled:true]

Starting conversation

To start conversation from your app, use:

     // Swift

PaldeskSDK.startConversation(viewController: self)

                  // Objective-C

                        [PaldeskSDK startConversationWithViewController: self];

                        Creating client

Depending on your Client authentification type settings from

Webapp -> Administration -> iOS SDK (, you can choose three options:

  • No data required – client will appear as “visitor” – you are free to start conversation without setting information about your client
  • You provide information about client through code – you can create client when your client becomes available to you with following method:

// Swift

   let params = [


       “externalId”: “123456”,

       “firstName”: “First Name”,

       “lastName”: “Last Name”


   PaldeskSDK.createClient(params: params)

// Objective-C

   [PaldeskSDK createClientWithParams:@{

                                        @”email”: @””,

                                        @”externalId”: @”testfasfasdf”,

                                        @”firstName”: @”First Name”,

                                        @”lastName”: @”Last Name”


Email and ExternalId fields are mandatory and other fields are optional. ExternalId should be something unique from your side, preferably your client’s id (or even email). If client information is not provided, your client will appear as “visitor”. You can explicitly create “visitor” by calling:

// Swift


// Objective-C

   [PaldeskSDK createAnonymousClient];

  • Client provides his information through form – your users will have to provide his information in registration form which will be shown on first start (prior to starting conversation).

Clearing client

To clear (logout) current client, use:

// Swift


// Objective-C

   [PaldeskSDK clear];

Important: If you call create client method multiple times, it will matter only first time. If you wish to create different client, please call clear method first and then you are able to create client again.

If you come across any issues send us an email to, we will be more than happy to help. 

iOS SDK was last modified: April 15th, 2021 by Igor Mirkovic
Share This