iOS Quickstart

The guide will help you setup our chat SDK in your iOS app.

ChatCamp helps you integrate chat functionality into your iOS application rapidly thereby saving your development effort and cost. You may start directly by installing our chat SDK into your app. There is no need to host any backend. It is a fully managed cloud based solution.

Setup for iOS

1. Create a new application from ChatCamp Dashboard

You need to create a new ChatCamp application to start integrating chat SDK into your iOS app. The application may be created by going to our ChatCamp Dashboard.

2. Install ChatCamp iOS SDK

To install our ChatCamp SDK via CocoaPods add these lines to your PodFile:

platform :ios, '8.0'

target 'MyProject' do
  use_frameworks!

  pod 'ChatCamp', '~> 4.2'
end

Next run the following command in your project directory:

pod install

3. Initialize ChatCamp SDK

To install ChatCamp you would first need to import it into your project:

import ChatCamp

Now initialize the ChatCamp client by using initApp() function of CCPClient class.

CCPClient.initApp(appId: APP_ID)

Here APP_ID is your application ID which you retrieve from the ChatCamp Dashboard.

4. Connect to ChatCamp backend

To connect to our chat backend you would need to use our connect function. It automatically creates the user if the user doesn't exist. We offer authentication via access token as well. This is discussed later in the guide.

CCPClient.connect(uid: USER_ID) { (user, error) in
	if(error == nil){
   //You are connected to ChatCamp backend now.
   }
}

Here USER_ID is the ID of your current app user.