Modifying UI

We now provide you along with the CometChat SDK, the source code for our UI. This source code can be found in the downloaded package under the iOS/CometChat UI Source folder in the downloaded package. This folder contains the source code for the UI.

Like mentioned in the previous sections, you are provided with the option to directly launch the existing UI that comes with the SDK. But now you can also modify the UI to suit your requirements. Feel free to dive into the codebase and play around with it. This will help you to get a clear understanding of how the application works and also in the process help you achieve the UI of your choice.

Setup to modify the UI.

Add the ‘readyui’ module to your existing application:

In the SDK, locate the sample app in the iOS/CometChat UI Source. In the sample app, locate a folder called readyui. Import the readyui folder as a module in existing iOS application project.

You can modify the Source code and replace existing images or add new images in ready UI as per your requirement.

Once you are Done with making changes in existing readyui project then you will need to rebuild the project so that you will get new CometChat UI .bundle and .framework file. Kindly refer below steps for the same.

  1. Clear Derived Date on your mac system.
  2. Build cometchat-ui-Resource by selecting a device from simulator with iOS version 8 and above.
  3. Build cometchat-ui by selecting a device from simulator with iOS version 8 and above.
  4. Build Framework by selecting ‘Generic iOS Device’.
  5. Once Framework is built successfully cometchat-ui.bundle and cometchat-ui.framework file will get generated on your Mac Desktop.

Now you can use the newly generated UI framework in your Xcode project.

  • Was this helpful?
  • Yes   No