Signup for CometChat and then:
- Create a new app
- Head over to the API Keys section and note the Auth Key, App ID & Region
- Xcode 11.4 (or Higher)
- iOS 11 or higher
We recommend using CocoaPods, as they are the most advanced way of managing iOS project dependencies. Open a terminal window, move to your project directory, and then create a
Podfile by running the following command.
CometChatPro SDK supports installation through Cocoapods only. Currently, we are supporting Xcode 11.4 and higher.
CometChatPro SDK includes video calling components. We suggest you run on physical devices to avoid errors.
$ pod init
Add the following lines to the Podfile.
platform :ios, '11.0' use_frameworks! target 'MyApp' do pod 'CometChatPro', '2.1.2' end
And then install the
CometChatPro framework through CocoaPods.
$ pod install
Always get the latest version of
CometChatPro by command
$ pod update CometChatPro
If you are integrating CometChat Pro iOS SDK in your Objective C app then you need to perform these two steps:
- Add below support files from the sample app:
Make sure you've selected ✅ Copy items if needed as well as 🔘 Create group options while adding the Library inside your project.
- Last step is to create a CometChatHeaderConstant.h file in your app and add the below line:
We have used AlertController in the above mentioned file just to catch the error and show it in our sample app. You can replace it with you component used to handle error. Also wherever you are using CometChat Pro SDK methods you should add
#import CometChatHeaderConstant.hin the .h file
Prepare your app for this requirement by providing justification strings. The justification string is a localizable message that you add to your app's
Info.plist file to tell the user why your app needs access to the user's photo library, Camera, Microphone. Then, App prompts the user to grant permission for access, the alert displays the justification string you provided, in the language of the locale selected on the user's device. You can do this as follows:
<key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true /> </dict> <key>NSCameraUsageDescription</key> <string>$(PRODUCT_NAME) need access to the camera in order to update your avatar</string> <key>NSPhotoLibraryUsageDescription</key> <string>$(PRODUCT_NAME) need access to the Photo Library in order to send Media Messages</string> <key>NSMicrophoneUsageDescription</key> <string>$(PRODUCT_NAME) need access to the Microphone in order to connect Audio/Video call </string>
To publish your App on App Store please follow this guide
Updated 20 days ago