Skip to main content
This guide builds a conversation list with push navigation to messages. Users tap a conversation to open the chat view. This assumes you’ve already completed iOS Integration (project created, UI Kit installed, init + login working, permissions configured).

What You’re Building

Three components working together:
  1. Conversation list — shows all active conversations (users and groups)
  2. Message view — displays chat messages for the selected conversation in real time
  3. Message composer — text input with support for media, emojis, and reactions

Step 1 — Setup SceneDelegate

Wire up the conversation list after successful login. When a user taps a conversation, push to the messages view.
SceneDelegate.swift
Key points:
  • CometChatConversations displays the conversation list
  • onItemClick fires when a user taps a conversation, passing the Conversation object
  • Extract User or Group from conversation.conversationWith and pass to the messages view

Step 2 — Create MessagesVC

Create a new Swift file for the messages view controller:
  1. In Xcode, right-click your project folder in the Navigator
  2. Select New File…
  3. Choose Swift File and click Next
  4. Name it MessagesVC.swift and click Create
Add the following code. This view controller assembles the header, message list, and composer.
MessagesVC.swift
How it works:
  • CometChatMessageHeader shows user/group info and back button
  • CometChatMessageList displays messages with real-time updates
  • CometChatMessageComposer handles text input, media, and reactions
  • Pass either user or group to each component, never both

Step 3 — Run the Project

Build and run in Xcode. You should see the conversation list. Tap any conversation to push to the messages view.

Next Steps

Theming

Customize colors, fonts, and styles to match your brand

Components Overview

Browse all prebuilt UI components

iOS Integration

Back to the main setup guide

Core Features

Chat features included out of the box