AI Integration Quick Reference
AI Integration Quick Reference
Overview
CometChat UI Kit provides pre-built components that you can use to quickly build a chat experience. Components are organized into three types based on complexity.Component Types
Base Components
Simple UI elements with no business logic. They display data you pass to them.- Swift
Components
UI elements with built-in business logic. They fetch data, handle actions, and emit events.- Swift
Composing a chat screen
The UI Kit ships no composite/all-in-one component — you compose the chat screen yourself from the three message components, and drive navigation from the list’sonItemClick. This keeps your
navigation, layout, and presentation under your control.
- Swift
For the full
MessagesVC — the three components laid out with safe-area constraints — follow
Conversation List + Message View. The same pattern with a users or
groups list is in One-to-One / Group Chat, and inside a tab bar in
Tab-Based Chat.Actions
Actions define how components respond to user interactions.Predefined Actions
Built-in behaviors that work automatically:- Swift
Custom Actions
Override default behavior with your own logic:- Swift
Events
Events allow components to communicate without direct references. Subscribe to events from anywhere in your app.Available Events
Subscribe to Events
- Swift
Configuring components
Because you compose the chat screen yourself, you configure each component directly on its own instance — there is no configuration object to pass down through a parent.- Swift
Pass the same
user (or group) to all three components — that shared target is what keeps the
header, list, and composer on the same conversation. Component-specific configuration objects do exist
for nested sub-features (for example ReactionsConfiguration, StickerKeyboardConfiguration,
IncomingCallConfiguration); see each component’s own page for its full API.Component Hierarchy
MessagesVC; everything below them is a
UI Kit component.
Quick Reference
When to Use Each Type
Common Patterns
- Swift
Related
- Component Styling - Customize appearance
- Color Resources - Theme colors
- Getting Started - Initial setup