AI Integration Quick Reference
AI Integration Quick Reference
Prerequisites
You need your app’s App ID, Auth Key and Region from the CometChat Dashboard (Your App → Credentials), Xcode 26 or later, and an iPhone or simulator running iOS 18 or later.Step 1 — Create an iOS Project
- In Xcode, choose File ▸ New ▸ Project… and select iOS ▸ App.
- Enter a product name, and choose SwiftUI for Interface and Swift for Language.
- Set the target’s Minimum Deployments to iOS 18.0.
Step 2 — Add the Package
- Choose File ▸ Add Package Dependencies… and paste
https://github.com/cometchat/cometchat-uikit-ios.git. - Set Dependency Rule to Up to Next Major Version from
6.0.0-beta.1. - Add the
CometChatSwiftUIproduct to your app target.
CometChatCore, the CometChat Chat SDK, the Cards SDK and
the Calls SDK resolve with it. The Calls SDK is included even when you don’t use calling; see
Calling to leave it out.
In a Package.swift:
Package.swift
Info.plist — see Step 3 of
Getting Started.
Step 3 — Initialise and Log In
Xcode’s template gives you anApp that shows ContentView. Make ContentView initialise the Kit and
log in from a .task, and render the chat once both finish. SwiftUI redraws when the state changes, so
there are no callbacks to wire:
ContentView.swift
APP_ID, REGION and AUTH_KEY with your credentials, and UID with a user’s ID — every new
app has test users cometchat-uid-1 to cometchat-uid-5. Run the app: you see the logged-in user’s
conversations, live.

Step 4 — Choose a Chat Experience
Pick the layout that suits your app. Each guide builds it step by step.Conversation List + Message View
Sequential navigation — the conversation list is the entry point, and a tap opens a full-screen chat.Build Conversation List + Message View
CometChatConversations in a NavigationStack, pushing a chat screenOne-to-One / Group Chat
A single chat window with no list. It opens a specific user’s or group’s chat directly — ideal for support chat, direct messages, or notification-driven flows.Build One-to-One / Group Chat
Header, message list and composer for one chat
Tab-Based Chat
ATabView with Chats, Calls, Users and Groups.
Build Tab-Based Chat
Each tab hosts a CometChat component
Make It Yours
Every part of a screen is replaceable, either as an initialiser argument or as a modifier that cascades to everything below it:Next Steps
Components Overview
Browse all available UI Kit components
Theming
Customize colors, fonts, and styles
Core Features
Chat features included out of the box
Troubleshooting
Common issues and fixes