Skip to main content
FieldValue
PackageCometChatUIKitSwift
FrameworkUIKit / SwiftUI
ComponentsCometChatConversations, CometChatCallLogs, CometChatUsers, CometChatGroups, CometChatMessageHeader, CometChatMessageList, CometChatMessageComposer
LayoutUITabBarController with Chats, Calls, Users, Groups tabs
PrerequisiteComplete iOS Integration Steps 1–4 first
PatternFull-featured messaging app with multiple sections
This guide builds a tabbed messaging UI — Chats, Calls, Users, and Groups tabs using UITabBarController. Good for full-featured apps that need more than just conversations. This assumes you’ve already completed iOS Integration (project created, UI Kit installed, init + login working, permissions configured).

What You’re Building

Four tabs working together:
  1. Chats — conversation list with push navigation to messages
  2. Calls — call logs history
  3. Users — list of available users
  4. Groups — list of available groups

Step 1 — Setup SceneDelegate

Initialize CometChat and launch the tabbed view after login.
SceneDelegate.swift

Step 2 — Setup Tab Bar

Create the UITabBarController with all four tabs. Each tab has its own navigation controller.
SceneDelegate.swift
Key points:
  • Each tab wraps its view controller in a UINavigationController for push navigation
  • onItemClick on conversations pushes to the messages view
  • hidesBottomBarWhenPushed = true hides the tab bar when viewing messages
  • SF Symbols are used for tab icons — customize as needed

Step 3 — 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

Step 4 — Run the Project

Build and run in Xcode. You should see the tab bar at the bottom with Chats, Calls, Users, and Groups. 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