iOS Chat

Integrate CometChat to your iOS App!

Create a highly customizable in-app messaging platform with CometChat Pro SDK for iOS. Enable meaningful conversations using CometChat Pro & customize the chat experience that your users have come to expect.

Integration Time: 30-60 minutes

Trusted by more than 50000 customers in over 127 countries

Designed for Developers to take control

Get complete control of your UI by integrating CometChat Pro Chat SDK in your iOS web app and swiftly deploy your ideas into reality.

let guid = "SUPERGROUP1";
let password = ""; // mandatory in case of protected group

CometChat.joinGroup(GUID: guid, groupType: .public, password: nil, onSuccess: { (Group) in

  // Success
  print("Group joined successfully: " + Group!.stringValue())

}) { (error) in

  // Failure
  print("Group joining failed with exception:" + error!.ErrorDescription);

extension ViewController: CometChatMessageDelegate {

  func onTextMessageReceived(textMessage: TextMessage ? , error : CometChatException ? ) {

    // received a new messsage of type text
    let receivedMessage = (textMessage as ? TextMessage);
    print("Message received successfully: " + receivedMessage!.stringValue())


  func onMediaMessageReceived(mediaMessage: MediaMessage ? , error : CometChatException ? ) {

    // received a new message of type media
    let receivedMessage = (mediaMessage as ? MediaMessage);
    print("Message received successfully: " + receivedMessage!.stringValue())


let receiverID = "SUPERHERO2"
let text = "Hello"

let textMessage = TextMessage(receiverUid: receiverID, text: text, messageType: .text, receiverType: .user)

CometChat.sendTextMessage(message: textMessage, onSuccess: { (message) in

  // success
  let sentMessage = (message as ? TextMessage);
  print("Message sent successfully: " + sentMessage!.stringValue())

}) { (error) in

  // error
  print("Message sending failed with exception:  " + error!.ErrorDescription);

let limit = 20;

let usersRequest = UsersRequest.UsersRequestBuilder(limit: limit).build();

usersRequest.fetchNext(onSuccess: { (users) in

  // Received user list success
  for user in users {

    // user
     print("User : " + user.stringValue())

}) { (error) in

  // Error
  print("User list fetching failed with exception: " + error.ErrorDescription);


Easiest way to add & customize chat in your app

Built & battle tested

CometChat Pro deploys over 50K+ automated tests across multiple platforms to ensure our chat works across every browser & updates.

Don’t build it from scratch

Our SDKs help save time by focussing on code that matters without having to reinvent the wheel. Quickstarts, developer documentation, open source sample code and our pre-built sample apps help you get up and running quickly.

Scale with confidence

We help you build a chat app that can be scaled from a startup to an enterprise within minutes without having to outsource your dev team. Our SDKs support every use case right out of the box with minimum latency, unparalleled uptime & flexibility.

Control your UI

CometChat Pro SDKs helps you make & manage your chat UI exactly the way you need. Start from our chat layout & build on top of it. Personalise chat experience for your users by customizing chat bubbles, calling profiles and so much more.