CometChat iOS Demo app (built using CometChat Pro) is a fully functional messaging app capable of one-on-one (private) and group messaging along with recent conversations. The app enables users to send text and multimedia messages like audio, video, images, documents.
Simply clone the project from iOS-swift-chat-app repository. After cloning the repository:
To run our open source app with CometChat Pro v2, follow these steps:
-
Select the appropriate version as per your Xcode version.
-
Navigate to project's folder and use below command to install the require pods.
$ pod install
-
Build and run the Sample App.
To use our sample with v1 Apps, you can checkout to branch v1 and follow instructions specified in readme.md.
To Run to sample App you have to do the following changes by Adding APP_ID, API_KEY and REGION_CODE
You can obtain your APP_ID, API_KEY and REGION_CODE from CometChat-Pro Dashboard
-
Open the project in Xcode.
-
Go to CometChatPro-swift-sampleApp --> CometChat-info.plist.
-
Under Authentication section, modify APP_ID and API_KEY and REGION with your own API_KEY, APP_ID and REGION.
-
Enter the UID at the time of login once the app is launched.
To use our sample with v1 Apps, you can checkout to branch v1 and follow instructions specified in readme.md.
We recommend using CocoaPods, as they are the most advanced way of managing iOS project dependencies.
To install the SDK you can refer the instuctions from here
We have provided three themes with our sample app namely PersianBlue, MountainMeadow, AzureRadiance. To apply the themes:
-
Go to CometChatPro-swift-sampleApp --> CometChat-info.plist
-
In UIApperance, enter the Theme name as shown below:
- Run the App. The App will look like below:
To customize the appearance of the App.
-
Go to CometChatPro-swift-sampleApp --> CometChat-info.plist
-
In UIApperance, enter the Theme name as 'Custom'
-
Fill the required parameters to perform the UI transformation.
-
You can build 1000+ combinations of themes as per requirement of the appearance of your iOS App.
-
Key | Description |
---|---|
UIAppearanceFont | |
regular | This field specifies the regular font used in entire app. |
bold | This field specifies the bold font used in entire app. |
italic | This field specifies the italic font used in entire app. |
UIAppearanceSize | |
CORNER_RADIUS | This field specifies the corner radius used in entire app. |
Padding | This field specifies the padding given in views. |
UIAppearanceColor | |
NAVIGATION_BAR_COLOR | This field specifies the Navigation bar color used in entire app. |
NAVIGATION_BAR_TITLE_COLOR | This field specifies the Navigation bar title color used in entire app. |
NAVIGATION_BAR_BUTTON_TINT_COLOR | This field specifies the Buttons tint color used in Navigation bar. |
BACKGROUND_COLOR | This field specifies the Background color used in views. |
LOGIN_BUTTON_TINT_COLOR | This field specifies the Buttons tint color used in app. |
LOGO_TINT_COLOR | This field specifies the tint color used for logo app. |
RIGHT_BUBBLE_BACKGROUND_COLOR | This field specifies the background color used for right bubble in app. |
SEARCH_BAR_STYLE_LIGHT_CONTENT | This field specifies the seach bar appearance used in app. |
Want to add localization in your app. Click here
-
We provide sample apps to elaborate the functionality of our SDK. You can refer the code and add the functionality as per your requirement.
-
All folder related to CometChatPro related functionality are added under 'Controllers' folder as shown below:
Facing any issues while running or installing the app. Click here
Feel free to make a suggestion by creating a pull request.