AI Integration Quick Reference
AI Integration Quick Reference
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:- Tab bar — switches between Chats, Calls, Users and Groups
- Content area — the CometChat component for the selected tab, in its own navigation stack, which the chat is pushed onto
- SwiftUI
- UIKit
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
- SwiftUI
- UIKit
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
- SwiftUI
- UIKit
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
- SwiftUI
- UIKit
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 inInfo.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