> ## Documentation Index
> Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# iOS UI Kit

> Prebuilt, customizable chat, messaging and calling components for iOS — a SwiftUI toolkit and a native UIKit toolkit over one shared data layer.

> [accordion] AI Integration Quick Reference
>
> | Field | Value |
> | - | - |
> | Package | `https://github.com/cometchat/cometchat-uikit-ios.git`, from `6.0.0-beta.1` — Swift Package Manager only |
> | SwiftUI toolkit | product `CometChatSwiftUI` (connected SwiftUI views) |
> | UIKit toolkit | product `CometChatUIKit` (native view controllers, cells, delegates) |
> | Shared core | `CometChatCore` — stores, value types, events, `CometChatSession` (comes with either toolkit) |
> | Peer deps | CometChat Chat SDK for iOS (`CometChatSDK`, 4.1.9+) — resolved by the package |
> | Requirements | iOS 18+, Swift 6, Xcode 26+ |
> | Source | [GitHub](https://github.com/cometchat/cometchat-uikit-ios) |

> [!NOTE]
>
> UI Kit v6 is in **beta** (`6.0.0-beta.1`). APIs may change before the stable release.

The CometChat iOS UI Kit provides prebuilt, customizable components for adding chat, voice and video
calling to an iOS app. Every component fetches its own data, listens for real-time events and keeps its
own state — so you drop it in and it works.

It ships two toolkits that share one data layer (`CometChatCore` — the stores, the value types and the
events), so the same screen behaves the same whichever you choose:

* **SwiftUI** — SwiftUI views, modifiers and bindings, for SwiftUI apps and new apps.
* **UIKit** — native view controllers, `UIView`s, cells and delegates, for UIKit apps.

![CometChat Conversations list rendered by the iOS UI Kit v6, showing avatars, names, last messages, timestamps and unread badges](https://mintcdn.com/cometchat-22654f5b/pWDsskjSUHgot30F/images/ui-kit/ios/v6/override-none.png?fit=max\&auto=format\&n=pWDsskjSUHgot30F\&q=85\&s=52632d9b876614d3adc2ff672fa4795f)

***

## Get Started

Every integration starts the same way — add the package, initialise, and log in — then you build the UI
with your chosen toolkit. Start with the prerequisites, then pick a path:

> [card] [Prerequisites & Setup](https://www.cometchat.com/docs/ui-kit/ios/v6/getting-started.md)
>
> App credentials, Swift Package Manager install, `initialize` and `login` — shared by both toolkits

> [card] [SwiftUI](https://www.cometchat.com/docs/ui-kit/ios/v6/getting-started-swiftui.md)
>
> Build your chat UI with SwiftUI views and modifiers

> [card] [UIKit](https://www.cometchat.com/docs/ui-kit/ios/v6/getting-started-uikit.md)
>
> Build your chat UI with native view controllers

***

## Choose a Toolkit

The Kit ships **three products**. `CometChatCore` is the foundation both toolkits share; the toolkit is
your choice — pick the one that matches how your app is built.

> [card] CometChatSwiftUI
>
> SwiftUI views that fetch, paginate and stay live. Most SwiftUI apps want this.

> [card] CometChatUIKit
>
> View controllers, cells and delegates. A native toolkit — not a wrapper.

> [card] CometChatCore
>
> The shared foundation: the session, stores, value types, theme and strings. Both toolkits re-export it.

> [tab] SwiftUI
>
> ```swift theme={null}
> import CometChatSwiftUI
>
> try await CometChatSession.initialize(appID: appID, region: region)
> try await CometChatSession.login(uid: uid, authKey: authKey)
>
> CometChatConversations(
>     onItemClick: { conversation in open(conversation) }
> )
> ```

> [tab] UIKit
>
> ```swift theme={null}
> import CometChatUIKit
>
> let conversations = CometChatConversations()
> conversations.title = "Chats"
> conversations.set(onItemClick: { conversation, _ in openChat(conversation) })
> navigationController?.pushViewController(conversations, animated: true)
> ```

### They render the same screen

The same data, the same design — one drawn by SwiftUI, one by UIKit. What differs is the API you write,
not what your user sees.

![The Conversations list, which looks the same whether the SwiftUI or the UIKit toolkit draws it](https://mintcdn.com/cometchat-22654f5b/pWDsskjSUHgot30F/images/ui-kit/ios/v6/uikit-stock.png?fit=max\&auto=format\&n=pWDsskjSUHgot30F\&q=85\&s=e30742b920e808a1588ea95e163faab7)

The Conversations list, as either toolkit draws it

### The two toolkits use different names, on purpose

The same option is spelled differently in each:

| | SwiftUI | UIKit |
| - | - | - |
| hide the back control | `hideBackIcon` | `hideBackButton` |
| hide the navigation bar | `hideToolbar` | `hideNavigationBar` |
| replace the whole row | `itemView` | `listItemView` |
| trailing region | `trailingView` | `trailView` |
| date formatting | `dateFormat`, `dateTimeFormatter` | `dateFormat`, `datePattern` |

Every component page shows both, in tabs: read the tab for the toolkit you chose and you never meet
the other's names. A few style types (`AvatarStyle`, `CallButtonStyle`, `DateStyle`,
`StatusIndicatorStyle`) and every component have the same name in both, which is why an app adds one
toolkit, not both.

### Requirements

| | |
| - | - |
| Deployment target | iOS 18 |
| Swift | 6 |
| Xcode | 26 or later |
| Distribution | Swift Package Manager |

> [!WARNING]
>
> v6 is distributed through **Swift Package Manager only** — there is no CocoaPods pod.

***

## Explore

> [card] [Components](https://www.cometchat.com/docs/ui-kit/ios/v6/components-overview.md)
>
> Browse all prebuilt UI components

> [card] [Features](https://www.cometchat.com/docs/ui-kit/ios/v6/core-features.md)
>
> Chat, calling, AI, and extensions

> [card] [Theming](https://www.cometchat.com/docs/ui-kit/ios/v6/theming.md)
>
> Colors, fonts, dark mode, and custom styling

> [card] [Guides](https://www.cometchat.com/docs/ui-kit/ios/v6/guide-overview.md)
>
> Threaded messages, new chat, search, and more

> [card] [Key Concepts](https://www.cometchat.com/docs/fundamentals/key-concepts.md)
>
> Essential terminology and platform features

> [card] [Architecture](https://www.cometchat.com/docs/ui-kit/ios/v6/architecture-data-flow.md)
>
> How components, stores, and data flow fit together

***

## Resources

> [card] [Source](https://github.com/cometchat/cometchat-uikit-ios)
>
> The package and its sample app

> [card] [Migration Guide](https://www.cometchat.com/docs/ui-kit/ios/v6/migrating-from-v5.md)
>
> Upgrading from v5

> [card] [Troubleshooting](https://www.cometchat.com/docs/ui-kit/ios/v6/troubleshooting.md)
>
> Common issues and fixes

> [card] [Support](https://help.cometchat.com/hc/en-us/requests/new)
>
> Open a support ticket


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.