-
Notifications
You must be signed in to change notification settings - Fork 274
Chat SDK iOS: Running the Chat SDK
The Chat SDK comes ready to run straight out of the box. You can load, compile and then test it within minutes.
Before you start we recommend watching the following video which runs through the entire process. You can then work through with the step by step instructions below.
There are a number of ways you can access the Chat SDK from Github:
- Forking the project
- Cloning the Project
- Downloading the project
When you fork the project it adds a copy of the project to your Github account. This means you can experiment and change the project without affecting the original project.
We recommend cloning the project to access it. Cloning the project allows you to download a current copy of the project. This is very easy to do:
- Open the console
- Change the consoles directory to this folder
- In the Chat SDK repositoty click on the
Clone or download
button - Copy the github URL provided
- Call the following in your console:
git clone https://github.com/chat-sdk/chat-sdk-ios.git
- Click the
Clone or download
button - Click
Download ZIP
To run the project you will first need to ensure you have Cocoapods installed on your computer. If you haven't come across Cocoapods before or don't have it installed already, follow the first part of this tutorial which will take you through the process.
Once this is completed you need to navigate to the Chat SDK project. The project should look something like this:
You can see the Xcode
and XcodeSwift
folders. These are the Objective-C and Swift versions of the chat. Depending on which one you are using you will need to:
- Open your console
- Change the console directory to the chat folder
- Call
pod install
in the terminal
Note: If you call
pod install
on thechat-sdk-ios
folder it will not update the pods correctly
Note: You may see a lot of text output at the end of calling pod install, this can be completely ignored. The warning doesn't affect the ChatSDK and is an issue with Cocoapods.
- Finally click on the Chat SDK Firebase.xcworkspace file to load up the project
Note: If you click the .xcoceproj folder the project will load but will not run correctly. Whenever using Cocoapods the .xcworkspace folder must be used to access the libraries.
The chat will now run with all the social media and different login types active. These are set up on our test accounts but are great to allow you to trial the app before adding it to your application.
Read the next tutorial to see how to add the Chat SDK to a custom project.