Skip to main content
This guide builds a tabbed messaging UI — Chats, Calls, Users and Groups in a tab bar, each tab showing its CometChat component, and a tap on a conversation, user or group opening the chat. It assumes you have completed the Getting Started guide for your toolkit (project created, package added, initialize and login working), and reuses the chat screen and conversation list from Conversation List + Message View — MessageView and ChatsView in SwiftUI, MessageViewController and ChatsViewController in UIKit.

What You’re Building

Two parts working together:
  1. Tab bar — switches between Chats, Calls, Users and Groups
  2. Content area — the CometChat component for the selected tab, in its own navigation stack, which the chat is pushed onto
A TabView with one Tab per section. Each tab has its own NavigationStack, so a chat pushed from Users stays in the Users tab.

Step 1: Set Up the Tabbed Screen

Create HomeView.swift. The Chats tab is ChatsView, which already has its stack; the others wrap their list in a NavigationStack and pass embedsNavigationStack: false, so the list uses yours:
HomeView.swift

Step 2: Create Tab Content

Add the Users and Groups tabs. Each holds the tapped user or group in @State and pushes the chat with navigationDestination(item:) — MessageView hides the tab bar while it is on screen:
UsersView.swift
The Calls tab lists call history and starts calls, which needs calling turned on at initialisation: CometChatSession.initialize(appID:region:enableCalling: true). Without it, leave the Calls tab out. See Calling Integration.

Step 3: Launch the Tabbed Screen

Render HomeView from ContentView once login finishes:
ContentView.swift

Step 4: Run the Project

Build and run. The tab bar shows Chats, Calls, Users and Groups; a tap on a conversation, user or group opens the chat in that tab. On iOS 26 the tab bar and the lists’ navigation bars are Liquid Glass. 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