
I want to checkout iOS UI Kit.
Follow the steps mentioned in the
README.md
file.Kindly, click on below button to download our iOS Chat UI Kit.iOS Chat UI KitView on GithubI want to integrate UI Kit with my AppI want to explore sample apps.
Import the app into Xcode and follow the steps mentioned in the
README.md
file.Kindly, click on below button to download our Swift Sample App.Swift Sample AppView on GithubOr else, you can also checkout our Objective-C Sample App.Objective-C Sample AppView on GithubPrerequisites
Before you begin, ensure you have met the following requirements:- You have installed the latest version of Xcode. (Above Xcode 12 Recommended)
- Please note, CometChat’s iOS Chat UI Kit works for iOS devices from iOS 11 and above.
If you’re building the new project, the please add below line in AppDelegate.swift> > var window: UIWindow?
Please install the latest pod version on your Mac to avoid integration issues> > Please follow the below steps:> > 1. sudo gem update cocoapods —pre> 2. pod update> 3. clean> 4. build
Installing the iOS Chat UI Kit
1. Setup 🔧
i. Register on CometChat 🧑💻- To install iOS Chat UI Kit, you need to first register on CometChat Dashboard. Click here to sign up.
- Create a new app
- Head over to the QuickStart or API & Auth Keys section and note the App ID, Auth Key, and Region.
2. Configure CometChat inside your iOS app
i. Initialize CometChat 🎬 Theinit()
method initializes the settings required for CometChat. We suggest calling the init()
method on app startup, preferably in the didFinishLaunchingWithOptions()
method of the Application class.
Make sure you replace the appId with your CometChat appId and region with your app region in the above code.
User
object and the Auth Key
as input parameters and returns the created User
object if the request is successful.
login()
method returns the User object containing all the information of the logged-in user.
- Make sure you replace the authKey with your CometChat Auth Key in the above code.> - We have set up 5 users for testing having UIDs: cometchat-uid-1, cometchat-uid-2, cometchat-uid-3, cometchat-uid-4, and cometchat-uid-5.
3. Add Swift Chat UI Kit to your project
To integrate Swift Chat UI Kit inside your app. Kindly follow the below steps: i. Simply clone the UIKit Library from the below repository.Library
folder and drag and drop the Library
folder inside your project’s folder.

4. Launch CometChat

CometChatUI
class. CometChatUI is a subclass of UITabbarController.
Please run the above code snippet in the main thread.
5. Receive Real-time calls (Optional)
To receive real-time call events when the app is in foreground, the user has to register for them in the App Delegate class.
- This method only allows user to launch the incoming call screen and other calling events when the app is in foreground mode.