Skip to main content
This guide builds a sequential chat layout — the conversation list is the entry point, and a tap opens a full-screen chat. It assumes you have completed the Getting Started guide for your toolkit (project created, package added, initialize and login working).

What You’re Building

Three parts working together:
  1. Conversation list — every conversation of the logged-in user, one-to-one and group
  2. Message header — the user’s or group’s name, avatar, and status or member count
  3. Message list + composer — the chat history, live, and the input
A NavigationStack holds the conversation list. A tap stores the chat in @State, and navigationDestination(item:) pushes the chat screen.
The conversation list this guide starts from

Step 1: Set Up the Conversation List

Create ChatsView.swift. CometChatConversations brings its own NavigationStack unless you pass embedsNavigationStack: false — pass it, because the chat is pushed onto yours:
ChatsView.swift
The list shows the system large-title navigation bar — “Chats”, with a search field — which is Liquid Glass on iOS 26 and opaque on earlier versions.

Step 2: Set Up the Message Screen

Create MessageView.swift. The list fills the screen, and the header and the composer are bars over it. The rows scroll under their Liquid Glass on iOS 26 and still come to rest clear of them. Host the bars with safeAreaBar on iOS 26: it also carries the list’s scroll edge effect under each bar, so the rows fade softly behind it. Earlier versions have no edge effect, and safeAreaInset hosts the bars the same way. Stacked in a VStack instead, nothing passes under the bars and the glass has nothing to show.The header is the screen’s bar. Keep the navigation bar, empty and clear, instead of hiding it: a hidden bar comes back when the swipe back starts and is drawn over the chat, with the list’s title and search field in it. A bar that stays cross-fades to the list’s. SwiftUI drops a bar that has nothing in it, so ask for it by name, and take its height back off the screen’s safe area so the header keeps its place under the status bar. Call dismiss from the header’s back button — it never pops by itself:
MessageView.swift
A chat: messages with reactions, a quoted reply with a thread, a missed call, the New separator, an edited and a deleted message

Step 3: Show It After Login

Render ChatsView from ContentView once login finishes:
ContentView.swift

Step 4: Run the Project

Build and run. The logged-in user’s conversations load; tap one to open the chat, and the header’s back button returns to the list. Messages you send appear at once, and incoming ones arrive live. The composer needs the camera, microphone and photo-library usage descriptions in Info.plist — see Step 3 of Getting Started.

Next Steps

Components Overview

Explore all available UI Kit components and their customization options

Theming

Customize colors, fonts, and styles to match your brand

Integration

Back to the main integration guide

Feature Guides

Add capabilities like threaded messages, blocking, and group management