Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1409,6 +1409,7 @@
"group": "Chat",
"pages": [
"ui-kit/ios/core-features",
"ui-kit/ios/offline-support",
"ui-kit/ios/extensions",
"ui-kit/ios/ai-features"
]
Expand Down
4 changes: 4 additions & 0 deletions ui-kit/ios/compact-message-composer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<Tabs>
<Tab title="Swift">
```swift
let compactComposer = CometChatCompactMessageComposer()

Check warning on line 21 in ui-kit/ios/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/compact-message-composer.mdx#L21

Did you really mean 'compactComposer'?
compactComposer.set(user: user)
compactComposer.set(controller: self)
compactComposer.translatesAutoresizingMaskIntoConstraints = false
Expand Down Expand Up @@ -143,13 +143,13 @@
<Tabs>
<Tab title="Swift">
```swift
var customStyle = CompactMessageComposerStyle()

Check warning on line 146 in ui-kit/ios/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/compact-message-composer.mdx#L146

Did you really mean 'customStyle'?
customStyle.activeSendButtonBackgroundColor = UIColor(hex: "#F76808")

Check warning on line 147 in ui-kit/ios/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/compact-message-composer.mdx#L147

Did you really mean 'customStyle'?
customStyle.attachmentImageTint = UIColor(hex: "#F76808")
customStyle.voiceRecordingImageTint = UIColor(hex: "#F76808")
customStyle.stickersImageTint = UIColor(hex: "#F76808")

let compactComposer = CometChatCompactMessageComposer()

Check warning on line 152 in ui-kit/ios/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/compact-message-composer.mdx#L152

Did you really mean 'compactComposer'?
compactComposer.style = customStyle
```
</Tab>
Expand Down Expand Up @@ -275,6 +275,10 @@

This is composer-side only: received multi-attachment messages still render with the grouped bubbles (see [Message List](/ui-kit/ios/message-list)).

### Sending while offline

With [offline support](/ui-kit/ios/offline-support#composer-and-unsent-messages) on, text messages and voice notes sent without a connection are queued and go out when the connection returns. Files staged in the tray still need a connection to upload, so they aren't queued. The tray keeps them for that chat, so they come back when the chat is opened again. Send files from the tray while connected. With `enableMultipleAttachments = false`, a picked photo, video, audio file or document is sent as a single media message instead, and is queued like a voice note. In edit mode, tapping Send leaves edit mode at once. If the edit then fails, the message keeps its old text, `onError` fires and a notice shows, and the next message you type is sent as a new message.

---

## Rich Text Formatting
Expand Down Expand Up @@ -340,10 +344,10 @@

| Property | Description | Code |
| -------- | ----------- | ---- |
| backgroundColor | Background color of the toolbar. | `toolbarStyle.backgroundColor = CometChatTheme.backgroundColor02` |

Check warning on line 347 in ui-kit/ios/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/compact-message-composer.mdx#L347

Did you really mean 'backgroundColor'?
| borderColor | Border color of the toolbar. | `toolbarStyle.borderColor = CometChatTheme.borderColorLight` |

Check warning on line 348 in ui-kit/ios/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/compact-message-composer.mdx#L348

Did you really mean 'borderColor'?
| buttonSize | Size of format buttons. | `toolbarStyle.buttonSize = 30` |

Check warning on line 349 in ui-kit/ios/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/compact-message-composer.mdx#L349

Did you really mean 'buttonSize'?
| buttonSpacing | Spacing between format buttons. | `toolbarStyle.buttonSpacing = CometChatSpacing.Spacing.s2` |

Check warning on line 350 in ui-kit/ios/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/compact-message-composer.mdx#L350

Did you really mean 'buttonSpacing'?
| iconTintColor | Tint color for inactive format icons. | `toolbarStyle.iconTintColor = CometChatTheme.iconColorSecondary` |
| activeIconTintColor | Tint color for active format icons. | `toolbarStyle.activeIconTintColor = CometChatTheme.primaryColor` |
| buttonBackgroundColor | Background color for inactive buttons. | `toolbarStyle.buttonBackgroundColor = .clear` |
Expand All @@ -357,7 +361,7 @@

### setTextFormatters

Assigns the list of text formatters. If the provided list is not null, it sets the list. Otherwise, it assigns the default text formatters retrieved from the data source. To configure the existing Mentions look and feel check out [CometChatMentionsFormatter](/ui-kit/ios/mentions-formatter-guide)

Check warning on line 364 in ui-kit/ios/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/compact-message-composer.mdx#L364

Did you really mean 'formatters'?

Check warning on line 364 in ui-kit/ios/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/compact-message-composer.mdx#L364

Did you really mean 'formatters'?

**Example**

Expand All @@ -373,7 +377,7 @@

let customMentionFormatter = CometChatMentionsFormatter()
.set(composerTextStyle: composerTextStyle)

Check warning on line 380 in ui-kit/ios/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/compact-message-composer.mdx#L380

Did you really mean 'compactComposer'?
let compactComposer = CometChatCompactMessageComposer()
compactComposer.set(textFormatter: [customMentionFormatter])
```
Expand Down Expand Up @@ -402,7 +406,7 @@

<Tabs>
<Tab title="Swift">
```swift

Check warning on line 409 in ui-kit/ios/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/compact-message-composer.mdx#L409

Did you really mean 'compactComposer'?
let compactComposer = CometChatCompactMessageComposer()

compactComposer.set(attachmentOptions: { user, group, controller in
Expand Down Expand Up @@ -455,7 +459,7 @@
<Tabs>
<Tab title="Swift">
```swift
compactComposer.reply(message: baseMessage)

Check warning on line 462 in ui-kit/ios/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/compact-message-composer.mdx#L462

Did you really mean 'baseMessage'?
```
</Tab>
</Tabs>
Expand All @@ -465,9 +469,9 @@
<Tabs>
<Tab title="Swift">
```swift
compactComposer.preview(message: baseMessage, mode: .edit)

Check warning on line 472 in ui-kit/ios/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/compact-message-composer.mdx#L472

Did you really mean 'baseMessage'?
// or
compactComposer.preview(message: baseMessage, mode: .reply)

Check warning on line 474 in ui-kit/ios/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/compact-message-composer.mdx#L474

Did you really mean 'baseMessage'?
```
</Tab>
</Tabs>
Expand Down
12 changes: 12 additions & 0 deletions ui-kit/ios/conversations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@
"callbacks": {
"onItemClick": "(Conversation, IndexPath) -> Void",
"onItemLongClick": "(Conversation, IndexPath) -> Void",
"onBack": "() -> Void",

Check warning on line 35 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L35

Did you really mean 'onBack'?
"onSelection": "([Conversation]) -> Void",

Check warning on line 36 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L36

Did you really mean 'onSelection'?
"onError": "(CometChatException) -> Void",

Check warning on line 37 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L37

Did you really mean 'onError'?
"onEmpty": "() -> Void",

Check warning on line 38 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L38

Did you really mean 'onEmpty'?
"onLoad": "([Conversation]) -> Void"

Check warning on line 39 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L39

Did you really mean 'onLoad'?
},
"visibility": {
"hideSearch": { "type": "Bool", "default": false },
"hideReceipts": { "type": "Bool", "default": false },
"hideUserStatus": { "type": "Bool", "default": false },
"hideOfflineNotices": { "type": "Bool", "default": false, "note": "Offline support only (v5.3.0+)" },
"hideGroupType": { "type": "Bool", "default": false },
"hideDeleteConversationOption": { "type": "Bool", "default": false },
"hideNavigationBar": { "type": "Bool", "default": false },
Expand All @@ -52,7 +53,7 @@
"customSoundForMessages": { "type": "URL?", "default": "nil" }
},
"selection": {
"selectionMode": { "type": "SelectionMode", "default": ".none" }

Check warning on line 56 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L56

Did you really mean 'selectionMode'?
},
"viewSlots": {
"listItemView": "(Conversation) -> UIView",
Expand Down Expand Up @@ -403,10 +404,10 @@
| Slot | Signature | Replaces |
|------|-----------|----------|
| `listItemView` | `(Conversation) -> UIView` | Entire conversation row |
| `leadingView` | `(Conversation) -> UIView` | Avatar / left section |

Check warning on line 407 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L407

Did you really mean 'leadingView'?
| `titleView` | `(Conversation) -> UIView` | Name / title text |

Check warning on line 408 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L408

Did you really mean 'titleView'?
| `subtitleView` | `(Conversation) -> UIView` | Last message preview |

Check warning on line 409 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L409

Did you really mean 'subtitleView'?
| `trailView` | `(Conversation) -> UIView` | Right side (time, badge) |

Check warning on line 410 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L410

Did you really mean 'trailView'?
| `emptyStateView` | `UIView` | Empty state display — assign a view, not a closure |
| `errorStateView` | `UIView` | Error state display — assign a view, not a closure |
| `loadingView` | `UIView` | Loading state display — assign a view, not a closure |
Expand Down Expand Up @@ -740,7 +741,7 @@
| List item look | Style | `listItemBackground` | `UIColor(white: 0.95, alpha: 1.0)` |
| Unread badge | Style | `badgeStyle` | `BadgeStyle()` with custom colors |
| Avatar appearance | Style | `avatarStyle` | `AvatarStyle()` with custom radius |
| Hide search | Property | `hideSearch` | `conversations.hideSearch = true` |

Check warning on line 744 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L744

Did you really mean 'hideSearch'?
| Hide receipts | Property | `hideReceipts` | `conversations.hideReceipts = true` |
| Custom row | View Slot | `set(listItemView:)` | See Custom View Slots section |

Expand Down Expand Up @@ -938,7 +939,7 @@

#### set(textFormatters:)

Sets custom text formatters for processing and displaying message text in conversation subtitles.

Check warning on line 942 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L942

Did you really mean 'formatters'?

```swift lines
@discardableResult
Expand All @@ -947,7 +948,7 @@

| Parameter | Type | Description |
|-----------|------|-------------|
| `textFormatters` | `[CometChatTextFormatter]` | Array of text formatters to apply to message text |

Check warning on line 951 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L951

Did you really mean 'textFormatters'?

Check warning on line 951 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L951

Did you really mean 'formatters'?

```swift lines
import CometChatUIKitSwift
Expand All @@ -967,7 +968,7 @@

All props are optional. Sorted alphabetically.

### avatarStyle

Check warning on line 971 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L971

Did you really mean 'avatarStyle'?

Customizes the appearance of avatars in conversation list items.

Expand All @@ -990,7 +991,7 @@
conversations.avatarStyle = avatarStyle
```

### badgeStyle

Check warning on line 994 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L994

Did you really mean 'badgeStyle'?

Customizes the appearance of unread message count badges.

Expand Down Expand Up @@ -1022,7 +1023,7 @@
| Type | `ConversationRequest.ConversationRequestBuilder?` |
| Default | `nil` |

### dateStyle

Check warning on line 1026 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L1026

Did you really mean 'dateStyle'?

Customizes the appearance of date/time labels in conversation list items.

Expand Down Expand Up @@ -1083,7 +1084,7 @@
| Type | `Bool` |
| Default | `false` |

### disableTyping

Check warning on line 1087 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L1087

Did you really mean 'disableTyping'?

Disables typing indicators in the conversation list.

Expand Down Expand Up @@ -1135,7 +1136,18 @@
| Type | `Bool` |
| Default | `false` |

### hideOfflineNotices

*Available since v5.3.0*

Hides the [offline support](/ui-kit/ios/offline-support#hide-offline-notices) notices about the whole cache, such as unsent messages that couldn't be recovered. With offline support on, the list shows saved conversations first, and **Connect to load chats** when nothing is saved and there is no connection.

| | |
|---|---|
| Type | `Bool` |
| Default | `false` |

### hideReceipts

Check warning on line 1150 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L1150

Did you really mean 'hideReceipts'?

Hides read/delivered receipt indicators.

Expand Down Expand Up @@ -1214,7 +1226,7 @@
conversations.protectedGroupIcon = UIImage(systemName: "lock.shield.fill")
```

### receiptStyle

Check warning on line 1229 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L1229

Did you really mean 'receiptStyle'?

Customizes the appearance of message receipt indicators (sent, delivered, read).

Expand Down Expand Up @@ -1269,7 +1281,7 @@

### textFormatters

Array of text formatters for customizing message text display.

Check warning on line 1284 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L1284

Did you really mean 'formatters'?

| | |
|---|---|
Expand Down Expand Up @@ -1362,7 +1374,7 @@
})
```

### Available Formatters

Check warning on line 1377 in ui-kit/ios/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/conversations.mdx#L1377

Did you really mean 'Formatters'?

| Formatter | Purpose | Default Format |
|-----------|---------|----------------|
Expand Down
27 changes: 26 additions & 1 deletion ui-kit/ios/core-features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
{"name": "threadedConversations", "description": "Reply to specific messages in threads", "component": "CometChatThreadedMessageHeader", "enabledByDefault": true},
{"name": "threadSubscription", "description": "Subscribe to or unsubscribe from a thread's replies", "component": "CometChatMessageList", "enabledByDefault": false},
{"name": "groupChat", "description": "Create and manage group conversations", "component": "CometChatGroups", "enabledByDefault": true},
{"name": "search", "description": "Search across conversations and messages", "component": "CometChatSearch", "enabledByDefault": true}
{"name": "search", "description": "Search across conversations and messages", "component": "CometChatSearch", "enabledByDefault": true},
{"name": "offlineSupport", "description": "Show saved chats without a connection and queue text messages until reconnect; turn on with UIKitSettings.setOfflineConfig(_:)", "component": "CometChatMessageList", "enabledByDefault": false}
],
"relatedComponents": ["CometChatMessageList", "CometChatConversations", "CometChatMessageList", "CometChatMessageComposer"]
}
Expand Down Expand Up @@ -106,7 +107,7 @@
}
```

Received messages render with per-type bubbles: a **media grid** for images and videos (with a fullscreen viewer — swipe, zoom, per-photo download, share), **playback rows** for audio files, and a **connected card stack** for documents. Messages from one send are grouped visually in the list. Per-message file count and per-file size limits come from your app's dashboard settings; violations surface directly in the tray.

Check warning on line 110 in ui-kit/ios/core-features.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/core-features.mdx#L110

Did you really mean 'fullscreen'?

See [Message Composer — Multiple Attachments](/ui-kit/ios/message-composer#multiple-attachments) for configuration and [Message Bubble Styling](/ui-kit/ios/message-bubble-styling) for the bubbles.

Expand Down Expand Up @@ -450,7 +451,7 @@
`enableRichTextFormatting` and `showRichTextFormattingOptions` are `true` by default. See the [CompactMessageComposer Rich Text Formatting](/ui-kit/ios/compact-message-composer#rich-text-formatting) section for full configuration details.

<Note>
Rich text formatting in message bubbles (rendering formatted text in the MessageList) is supported from UI Kit version 5.1.12 onwards. Earlier versions will display the raw markdown syntax instead of formatted text.

Check warning on line 454 in ui-kit/ios/core-features.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/core-features.mdx#L454

Did you really mean 'onwards'?
</Note>

| Component | Functionality |
Expand Down Expand Up @@ -827,6 +828,30 @@
- [MessageHeader](/ui-kit/ios/message-header) - Search within conversation
- [Conversations](/ui-kit/ios/conversations) - Search conversations

## Offline Support

*Available since v5.3.0*

Show chats the user has opened before without a connection, and queue text messages sent offline until the connection returns. Photos, videos and files picked in the attachment tray need a connection to upload. Lists show their saved rows first, unsent messages offer Retry and Delete, and every screen shows a clear "Connect to load …" state when it has nothing saved. Offline support is off by default.

```swift lines
import CometChatUIKitSwift
import CometChatSDK

let uikitSettings = UIKitSettings()
.set(appID: "APP_ID")
.set(region: "REGION")
.set(authKey: "AUTH_KEY")
.setOfflineConfig(OfflineConfig.Builder().setEnabled(true).build())
.build()

CometChatUIKit.init(uiKitSettings: uikitSettings) { result in
// Log in and show the UI Kit screens as usual.
}
```

UI Kit 5.3.0, the first version with offline support, needs Chat SDK 4.2.1 or later. See [Offline Support](/ui-kit/ios/offline-support) for requirements, component behaviour, texts, styling and events.

## Moderation

Automatically filter inappropriate content.
Expand Down Expand Up @@ -985,7 +1010,7 @@
conversationsNav.tabBarItem = UITabBarItem(
title: "Chats",
image: UIImage(systemName: "message"),
selectedImage: UIImage(systemName: "message.fill")

Check warning on line 1013 in ui-kit/ios/core-features.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/core-features.mdx#L1013

Did you really mean 'selectedImage'?
)

// Users Tab
Expand Down
2 changes: 2 additions & 0 deletions ui-kit/ios/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@

*Available since v5.1.22*

Listen for thread subscription changes so any subscription control you host stays in agreement with the kit's action-sheet option, without a refetch.

Check warning on line 367 in ui-kit/ios/events.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/events.mdx#L367

Did you really mean 'refetch'?

```swift lines
import UIKit
Expand Down Expand Up @@ -447,7 +447,7 @@
// Message lifecycle
func onMessageSent(message: BaseMessage, status: MessageStatus) {
switch status {
case .inProgress:

Check warning on line 450 in ui-kit/ios/events.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/events.mdx#L450

Did you really mean 'inProgress'?
print("Sending...")
case .success:
print("Message sent: \(message.id)")
Expand Down Expand Up @@ -580,6 +580,8 @@
| `onVoiceCall` | Voice call initiated |
| `onVideoCall` | Video call initiated |
| `onMessageError` | Message operation failed |
| `ccMessageSendStateChanged` | An own message moved between sending, sent, failed and discarded. Only with [offline support](/ui-kit/ios/offline-support#offline-events) on |
| `ccOfflineCacheReset` | The Chat SDK reset its offline cache. Only with [offline support](/ui-kit/ios/offline-support#offline-events) on |

## Card Events

Expand Down
5 changes: 5 additions & 0 deletions ui-kit/ios/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
| --- | --- |
| Package | `CometChatUIKitSwift` |
| Version | `5.2.3` (Swift Package Manager, Up to Next Major Version) |
| Requirements | Xcode 16+, iOS 15.1+, Swift 5.3+ |

Check warning on line 13 in ui-kit/ios/getting-started.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/getting-started.mdx#L13

Did you really mean 'Xcode'?
| Init | `CometChatUIKit.init(uiKitSettings:)` — must complete before `login()` |
| Login | `CometChatUIKit.login(uid:)` — must complete before rendering components |
| Order | `init()` → `login()` → render. Breaking this order = blank screen |
| Auth Key | Dev/testing only. Use Auth Token in production |
| Calling | Optional. Add `CometChatCallsSDK` 5.0.4 (Up to Next Major Version) to enable |
| Dependencies | `CometChatSDK` 4.1.10+ (resolved automatically by the UI Kit package) |
| Offline support | Optional, off by default, from UI Kit 5.3.0. UI Kit 5.3.0 and later need `CometChatSDK` 4.2.1+ (the Dependencies row above is for the 5.2.x releases). `UIKitSettings().setOfflineConfig(_:)` before `build()`. See [Offline Support](/ui-kit/ios/offline-support) |
| AI Skills | `npx @cometchat/skills add` — [GitHub](https://github.com/cometchat/cometchat-skills) |

</Accordion>
Expand Down Expand Up @@ -45,11 +46,11 @@
/cometchat add chat to my app
```

The skill detects your iOS project structure, navigation pattern (UIKit or SwiftUI), and existing auth system. It onboards you to CometChat directly in the terminal — signup, login, and app creation all via the CLI. It reads your view controllers, navigation, and components before proposing a placement, shows the plan, and waits for your approval before writing code. Credentials are saved via `Secrets.swift` or `.xcconfig`.

Check warning on line 49 in ui-kit/ios/getting-started.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/getting-started.mdx#L49

Did you really mean 'UIKit'?

Check warning on line 49 in ui-kit/ios/getting-started.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/getting-started.mdx#L49

Did you really mean 'onboards'?

Check warning on line 49 in ui-kit/ios/getting-started.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/getting-started.mdx#L49

Did you really mean 'signup'?

After the first integration, re-run `/cometchat` to access the iteration menu: theme presets, 40+ features, component customization, production auth, user management, and diagnostics.

Works with Claude Code, Cursor, Codex, VS Code Copilot, Windsurf, Cline, Kiro, and [30+ more agents](https://github.com/cometchat/cometchat-skills).

Check warning on line 53 in ui-kit/ios/getting-started.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/getting-started.mdx#L53

Did you really mean 'Kiro'?

---

Expand All @@ -64,9 +65,9 @@
| Region | Dashboard → Your App → Credentials (e.g. `us`, `eu`, `in`) |

You also need:
- Xcode 16 or later

Check warning on line 68 in ui-kit/ios/getting-started.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/getting-started.mdx#L68

Did you really mean 'Xcode'?
- iOS device or simulator running iOS 15.1+
- Swift 5.3+ (Xcode 16 ships Swift 6, which satisfies this)

Check warning on line 70 in ui-kit/ios/getting-started.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/getting-started.mdx#L70

Did you really mean 'Xcode'?
- macOS

<Warning>
Expand All @@ -77,7 +78,7 @@

## Step 1 — Create an iOS Project

Open Xcode and create a new project:

Check warning on line 81 in ui-kit/ios/getting-started.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/getting-started.mdx#L81

Did you really mean 'Xcode'?

1. Select **iOS App** in the template picker and click Next
2. Enter your project name and bundle identifier
Expand Down Expand Up @@ -138,12 +139,12 @@
<img src="/images/e736dfc8-app_permissions-6c9e93e30fb31f4e1427f6b72f94a58b.png" />
</Frame>

Also disable **User Script Sandboxing** in Build Settings to ensure WebView can load scripts for collaborative tools:

Check warning on line 142 in ui-kit/ios/getting-started.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/getting-started.mdx#L142

Did you really mean 'Sandboxing'?

1. Select your project in the Navigator
2. Select your app target
3. Go to **Build Settings** tab
4. Search for "User Script Sandboxing"

Check warning on line 147 in ui-kit/ios/getting-started.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/getting-started.mdx#L147

Did you really mean 'Sandboxing'?
5. Set it to **No**

<Frame>
Expand Down Expand Up @@ -217,7 +218,7 @@
}
```

For development, use one of the pre-created test UIDs:

Check warning on line 221 in ui-kit/ios/getting-started.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/getting-started.mdx#L221

Did you really mean 'UIDs'?

`cometchat-uid-1` · `cometchat-uid-2` · `cometchat-uid-3` · `cometchat-uid-4` · `cometchat-uid-5`

Expand All @@ -238,6 +239,10 @@
For production, use [`loginWithAuthToken()`](/ui-kit/ios/methods#login-using-auth-token) instead of Auth Key. Generate tokens server-side via the REST API.
</Note>

<Tip>
To let users open saved chats and queue text messages without a connection, add `.setOfflineConfig(OfflineConfig(enabled: true))` to `UIKitSettings` before `.build()`. Offline support is off by default and is available from UI Kit 5.3.0. UI Kit 5.3.0, the first version with offline support, needs Chat SDK 4.2.1 or later. See [Offline Support](/ui-kit/ios/offline-support).
</Tip>

<Tip>
Having issues? Check the [Troubleshooting Guide](/ui-kit/ios/troubleshooting) for common problems and solutions.
</Tip>
Expand All @@ -250,7 +255,7 @@

### Conversation List + Message View

Two-panel layout — conversation list with push navigation to messages. Think iMessage or WhatsApp.

Check warning on line 258 in ui-kit/ios/getting-started.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/getting-started.mdx#L258

Did you really mean 'iMessage'?

- Push-based navigation between conversations and messages
- Supports one-to-one and group chats
Expand Down
2 changes: 1 addition & 1 deletion ui-kit/ios/guide-threaded-messages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
description: "Add threaded messages in CometChat iOS UI Kit with parent message context, reply views, message composers, and thread navigation."
---

Enhance your iOS chat app with threaded messaging by integrating CometChat's UIKit for iOS, allowing users to reply to specific messages within a focused thread view.

Check warning on line 7 in ui-kit/ios/guide-threaded-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/guide-threaded-messages.mdx#L7

Did you really mean 'UIKit'?

## Overview

Threaded messages allow users to reply to specific messages within a conversation, creating a sub-conversation for improved clarity and context. With CometChat's UIKit for iOS, you can:

Check warning on line 11 in ui-kit/ios/guide-threaded-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/guide-threaded-messages.mdx#L11

Did you really mean 'UIKit'?

- Display a dedicated thread view
- View and send replies to a selected message
Expand All @@ -19,7 +19,7 @@
Before implementing this feature, ensure you have:

1. Completed [Getting Started](/ui-kit/ios/getting-started) setup
2. CometChat UIKit v5+ installed

Check warning on line 22 in ui-kit/ios/guide-threaded-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/guide-threaded-messages.mdx#L22

Did you really mean 'UIKit'?
3. User logged in with `CometChatUIKit.login()`

## Components
Expand Down Expand Up @@ -188,7 +188,7 @@
|----------|----------|
| Parent message deleted | Display a fallback UI or disable the composer |
| No replies | Show an empty state (e.g., "No replies yet") |
| Offline mode | Disable the composer and queue thread operations |
| Offline mode | With [offline support](/ui-kit/ios/offline-support) on, the composer stays enabled: text replies and voice notes are queued and sent when the connection returns. Editing, deleting and reacting need a connection. Photos, videos and files picked in the attachment tray need a connection to upload |

## Error Handling

Expand Down Expand Up @@ -221,7 +221,7 @@
Explore a complete sample application demonstrating threaded messaging
</Card>
<Card title="UIKit Source" href="https://github.com/cometchat/cometchat-uikit-ios/tree/v5">
Browse the CometChat UIKit for iOS source code

Check warning on line 224 in ui-kit/ios/guide-threaded-messages.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/guide-threaded-messages.mdx#L224

Did you really mean 'UIKit'?
</Card>
</CardGroup>

Expand Down
1 change: 1 addition & 0 deletions ui-kit/ios/llms-ios-v5.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
- Fallback: if a `.md` twin 404s, fetch the same URL **without** `.md` (HTML). Never read the
framework's `.swiftinterface` for behaviour, and never answer an API from memory.
- iOS specifics: components are `UIView`/`UIViewController` subclasses configured through
**chainable `set(...)` methods** (`set(user:)`, `set(onItemClick:)`), not React-style props.

Check warning on line 32 in ui-kit/ios/llms-ios-v5.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/llms-ios-v5.mdx#L32

Did you really mean 'chainable'?
Some surfaces are settable **properties** instead (`hideNavigationBar`, `style`) — check the
component page rather than assuming a setter exists.

Expand All @@ -54,7 +54,7 @@
## Hot path — usually no fetch needed
For a plain "add chat" the install, `init → login → render` ordering, and the core drop-in
composition are stable; a well-built agent skill bakes them. Fetch below only for exhaustive
APIs, long-tail components, theming tokens, or feature enablement.

Check warning on line 57 in ui-kit/ios/llms-ios-v5.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/llms-ios-v5.mdx#L57

Did you really mean 'enablement'?
- Setup: [iOS Integration](/ui-kit/ios/getting-started) · [Overview](/ui-kit/ios/overview)
- **There is no composite chat component.** No `CometChatMessages`,
`CometChatConversationsWithMessages`, `CometChatUsersWithMessages` or
Expand All @@ -79,7 +79,7 @@
- [Troubleshooting](/ui-kit/ios/troubleshooting)

## Task guides (recipes)
End-to-end, buildable walkthroughs. **Build FROM the guide** for a whole feature, then apply

Check warning on line 82 in ui-kit/ios/llms-ios-v5.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/llms-ios-v5.mdx#L82

Did you really mean 'buildable'?

Check warning on line 82 in ui-kit/ios/llms-ios-v5.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/llms-ios-v5.mdx#L82

Did you really mean 'walkthroughs'?
component-level corrections from the component pages on top.
- [Overview](/ui-kit/ios/guide-overview)
- [Conversation List + Message View](/ui-kit/ios/ios-conversation)
Expand Down Expand Up @@ -132,6 +132,7 @@
- [Color Resources](/ui-kit/ios/color-resources)

## Features and extras
- [Offline Support](/ui-kit/ios/offline-support)
- [Extensions](/ui-kit/ios/extensions)
- [Campaigns](/ui-kit/ios/campaigns)
- [Localize](/ui-kit/ios/localize)
Expand Down
2 changes: 2 additions & 0 deletions ui-kit/ios/localize.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
| Localize Class | `CometChatLocalize` |
| Set Locale | `CometChatLocalize.set(locale: .french)` |
| Get Locale | `CometChatLocalize.getLocale()` |
| Supported Languages | 17 languages (en, fr, de, es, hi, ru, pt, zh, ja, ko, tr, ms, sv, lt, hu, nl) |

Check warning on line 15 in ui-kit/ios/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/localize.mdx#L15

Did you really mean 'ru'?

Check warning on line 15 in ui-kit/ios/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/localize.mdx#L15

Did you really mean 'zh'?

Check warning on line 15 in ui-kit/ios/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/localize.mdx#L15

Did you really mean 'ko'?

Check warning on line 15 in ui-kit/ios/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/localize.mdx#L15

Did you really mean 'sv'?

Check warning on line 15 in ui-kit/ios/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/localize.mdx#L15

Did you really mean 'lt'?

Check warning on line 15 in ui-kit/ios/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/localize.mdx#L15

Did you really mean 'hu'?

Check warning on line 15 in ui-kit/ios/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/localize.mdx#L15

Did you really mean 'nl'?
| Override Strings | Define same key in app's `Localizable.strings` |
| DateTime Formatter | `CometChatUIKit.dateTimeFormatter` or component-level |
| DateTime Closures | `time`, `today`, `yesterday`, `lastweek`, `otherDay`, `minute`, `minutes`, `hour`, `hours` |
Expand Down Expand Up @@ -115,18 +115,20 @@
- Provide custom translations for them in your app
- Keep your localization files in sync with SDK updates

The texts that [offline support](/ui-kit/ios/offline-support) shows, such as "Connect to load chats", "Not sent yet" and "Available when online", are listed with their keys in [Offline states and texts](/ui-kit/ios/offline-support#offline-states-and-texts). Override them the same way.

By using the `CometChatLocalize` class, you can provide a user-friendly, localized experience to your users, enhancing the overall user experience within your application.

---

## Customization

CometChatUIKit for iOS allows developers to customize localization values easily. For example, if an English-language app requires the label "Chat" to be shown as "Chats," the developer can simply define the same localization key used in the UIKit inside the app's English localization file and assign it a different value. CometChatUIKit will automatically detect and use the overridden value from the app-level localization.

Check warning on line 126 in ui-kit/ios/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/localize.mdx#L126

Did you really mean 'UIKit'?

### Steps to Customize Strings

1. **Identify the String Key**
- Check the UIKit source code for the exact key of the string you want to modify: [Localization file](https://github.com/cometchat/cometchat-uikit-ios/blob/v5/CometChatUIKitSwift/Components/Shared/Resources/en.lproj/Localizable.strings)

Check warning on line 131 in ui-kit/ios/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/localize.mdx#L131

Did you really mean 'UIKit'?

2. **Navigate to the App Level Localization File**
- Add the same key with the changed value you want
Expand Down Expand Up @@ -223,7 +225,7 @@
<Tabs>
<Tab title="Swift">
```swift lines
let messageList = CometChatMessageList()

Check warning on line 228 in ui-kit/ios/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/localize.mdx#L228

Did you really mean 'messageList'?
messageList.set(user: user)

messageList.dateTimeFormatter.hour = { timestamp in
Expand Down
2 changes: 2 additions & 0 deletions ui-kit/ios/message-bubble-styling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

Both classes provide properties for customizing background color, border, corner radius, and specific styles for individual message types.

With [offline support](/ui-kit/ios/offline-support#message-list-and-threads) on, an image, video, audio or file bubble with no copy on the device and no connection shows a placeholder with the file name, size and "Available when online". Style that text, and the "Not sent yet" and "Not sent. Tap to retry" lines under unsent messages, with [`CometChatMessageList.offlineStyle`](/ui-kit/ios/offline-support#offline-style).

---

## Properties
Expand All @@ -36,11 +38,11 @@

| Property | Description |
|----------|-------------|
| **backgroundColor** | The background color for message bubbles |

Check warning on line 41 in ui-kit/ios/message-bubble-styling.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-bubble-styling.mdx#L41

Did you really mean 'backgroundColor'?
| **backgroundDrawable** | A background image for message bubbles |

Check warning on line 42 in ui-kit/ios/message-bubble-styling.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-bubble-styling.mdx#L42

Did you really mean 'backgroundDrawable'?
| **borderWidth** | The width of the border for message bubbles |

Check warning on line 43 in ui-kit/ios/message-bubble-styling.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-bubble-styling.mdx#L43

Did you really mean 'borderWidth'?
| **borderColor** | The color of the border for message bubbles |

Check warning on line 44 in ui-kit/ios/message-bubble-styling.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-bubble-styling.mdx#L44

Did you really mean 'borderColor'?
| **cornerRadius** | The corner radius for message bubbles |

Check warning on line 45 in ui-kit/ios/message-bubble-styling.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-bubble-styling.mdx#L45

Did you really mean 'cornerRadius'?

### Specific Message Type Styles

Expand Down Expand Up @@ -224,7 +226,7 @@

## Media Grid Bubble

Media grid bubbles render messages that carry **multiple image or video attachments** as a count-based grid (1, 2, 3, 4, or 5+ tiles). When there are more items than visible tiles, the last tile shows a "+N" overflow badge; video tiles carry a play badge and duration pill. Tapping any tile opens the fullscreen media viewer with swipe navigation, pinch-to-zoom, inline video playback, per-photo download, and share.

Check warning on line 229 in ui-kit/ios/message-bubble-styling.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-bubble-styling.mdx#L229

Did you really mean 'fullscreen'?

<Frame>
<img src="/images/ios_imagesbubble.png" alt="Media grid bubbles rendering multiple image attachments as a 2x2 grid with a +4 overflow badge on the last tile, shown for both incoming and outgoing messages" />
Expand Down
4 changes: 4 additions & 0 deletions ui-kit/ios/message-composer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"callbacks": {
"onSendButtonClick": "(BaseMessage) -> Void",
"onTextChangedListener": "(String) -> Void",
"onError": "(CometChatException) -> Void"

Check warning on line 23 in ui-kit/ios/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-composer.mdx#L23

Did you really mean 'onError'?
},
"visibility": {
"hideAttachmentButton": "Bool (default: false)",
Expand Down Expand Up @@ -191,11 +191,11 @@

| Slot | Signature | Replaces |
|------|-----------|----------|
| `headerView` | `(User?, Group?) -> UIView` | Area above the composer input |

Check warning on line 194 in ui-kit/ios/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-composer.mdx#L194

Did you really mean 'headerView'?
| `footerView` | `(User?, Group?) -> UIView` | Area below the composer input |

Check warning on line 195 in ui-kit/ios/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-composer.mdx#L195

Did you really mean 'footerView'?
| `sendButtonView` | `(User?, Group?) -> UIView` | Send button |
| `auxillaryButtonView` | `(User?, Group?) -> UIView` | Sticker and AI button area |
| `attachmentOptions` | `(User?, Group?, UIViewController?) -> [CometChatMessageComposerAction]` | Default attachment options list |

Check warning on line 198 in ui-kit/ios/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-composer.mdx#L198

Did you really mean 'attachmentOptions'?

### headerView

Expand Down Expand Up @@ -361,7 +361,7 @@
| Per-file size | `file.size.max` (default 100 MB) | The file stages as a red, non-retryable error tile; sending is blocked until it is removed |
| File type | Server-side validation | The upload is refused by the server and the file becomes a red, non-retryable error tile |

Tapping an error tile shows a snack bar with the reason ("File exceeds N MB.", "This file type isn't allowed."). The snack bar's appearance is themable through `CometChatErrorStateStyle`:

Check warning on line 364 in ui-kit/ios/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-composer.mdx#L364

Did you really mean 'themable'?

```swift
CometChatErrorState.defaultStyle.backgroundColor = .systemRed
Expand All @@ -378,6 +378,10 @@

This is composer-side only: received multi-attachment messages still render with the grouped bubbles (see [Message List](/ui-kit/ios/message-list)).

### Sending while offline

With [offline support](/ui-kit/ios/offline-support#composer-and-unsent-messages) on, text messages and voice notes sent without a connection are queued and go out when the connection returns. Files staged in the tray still need a connection to upload, so they aren't queued. The tray keeps them for that chat, so they come back when the chat is opened again. Send files from the tray while connected. With `enableMultipleAttachments = false`, a picked photo, video, audio file or document is sent as a single media message instead, and is queued like a voice note. An edit that fails keeps the edited text and the edit banner, calls `onError` and shows a notice.

---

## Common Patterns
Expand Down Expand Up @@ -549,7 +553,7 @@
| `hideVoiceRecordingButton` | `Bool` | `false` | Hides the voice recording button |
| `maxLine` | `Int` | `5` | Maximum lines before scrolling |
| `placeholderText` | `String` | `"Type a message..."` | Placeholder text |
| `textFormatters` | `[CometChatTextFormatter]` | `[]` | Custom text formatters |

Check warning on line 556 in ui-kit/ios/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-composer.mdx#L556

Did you really mean 'formatters'?

---

Expand Down
18 changes: 18 additions & 0 deletions ui-kit/ios/message-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
description: "Display CometChat iOS UI Kit messages with text, media, reactions, threads, real-time updates, filters, and message callbacks."
---

The `CometChatMessageList` component displays a scrollable list of messages in a conversation. It supports text messages, media messages, reactions, threads, and real-time updates for new messages, edits, and deletions.

Check warning on line 6 in ui-kit/ios/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-list.mdx#L6

Did you really mean 'scrollable'?

<Frame>
<img src="/images/942fc513-message_list-90e4da42a9cbee8143f9caeb4ca12282.png" alt="CometChatMessageList showing a scrollable list of chat messages with text bubbles, timestamps, and read receipts in a conversation view" />

Check warning on line 9 in ui-kit/ios/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-list.mdx#L9

Did you really mean 'scrollable'?
</Frame>

<Accordion title="AI Integration Quick Reference">
Expand Down Expand Up @@ -38,9 +38,9 @@
"onThreadRepliesClick": "(BaseMessage, MessageTemplate) -> Void",
"onReactionClick": "(ReactionCount, BaseMessage?) -> Void",
"onReactionListItemClick": "(MessageReaction, BaseMessage) -> Void",
"onError": "(CometChatException) -> Void",

Check warning on line 41 in ui-kit/ios/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-list.mdx#L41

Did you really mean 'onError'?
"onEmpty": "() -> Void",

Check warning on line 42 in ui-kit/ios/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-list.mdx#L42

Did you really mean 'onEmpty'?
"onLoad": "([BaseMessage]) -> Void"

Check warning on line 43 in ui-kit/ios/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-list.mdx#L43

Did you really mean 'onLoad'?
},
"visibility": {
"hideAvatar": { "type": "Bool?", "default": "nil" },
Expand All @@ -61,6 +61,7 @@
"hideThreadSubscriptionOption": { "type": "Bool", "default": false },
"hideGroupActionMessages": { "type": "Bool", "default": false },
"hideNewMessageIndicator": { "type": "Bool", "default": false },
"hideOfflineNotices": { "type": "Bool", "default": false, "note": "Offline support only (v5.3.0+)" },
"hideEmptyView": { "type": "Bool", "default": false },
"hideErrorView": { "type": "Bool", "default": false },
"hideLoadingView": { "type": "Bool", "default": false }
Expand Down Expand Up @@ -262,6 +263,12 @@

---

## Offline Support

With [offline support](/ui-kit/ios/offline-support#message-list-and-threads) on, the list (and a thread's replies) shows saved history at once, then updates it from the server. Own messages that aren't sent yet offer only **Retry** and **Delete**. At the end of the saved messages with no connection, the list shows **Connect to load more**. Use `hideOfflineNotices` to hide the offline notices, and the static `CometChatMessageList.offlineStyle` ([Offline style](/ui-kit/ios/offline-support#offline-style)) to style them.

---

## Actions and Events

### Callback Props
Expand Down Expand Up @@ -789,9 +796,9 @@

---

## Text Formatters

Check warning on line 799 in ui-kit/ios/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-list.mdx#L799

Did you really mean 'Formatters'?

Customize how text is displayed in messages using text formatters.

Check warning on line 801 in ui-kit/ios/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-list.mdx#L801

Did you really mean 'formatters'?

```swift lines
import CometChatUIKitSwift
Expand All @@ -806,7 +813,7 @@

### set(textFormatters:)

Sets custom text formatters for message text display.

Check warning on line 816 in ui-kit/ios/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-list.mdx#L816

Did you really mean 'formatters'?

```swift lines
@discardableResult
Expand All @@ -815,7 +822,7 @@

| Parameter | Type | Description |
|-----------|------|-------------|
| `textFormatters` | `[CometChatTextFormatter]` | Array of text formatters to apply |

Check warning on line 825 in ui-kit/ios/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-list.mdx#L825

Did you really mean 'textFormatters'?

Check warning on line 825 in ui-kit/ios/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-list.mdx#L825

Did you really mean 'formatters'?

```swift lines
import CometChatUIKitSwift
Expand Down Expand Up @@ -1067,7 +1074,7 @@

Configure how reactions are displayed and behave in the message list.

### reactionsConfiguration

Check warning on line 1077 in ui-kit/ios/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-list.mdx#L1077

Did you really mean 'reactionsConfiguration'?

Configuration object for the reactions feature.

Expand Down Expand Up @@ -1358,7 +1365,7 @@
| Loading shimmer | Style | `shimmerGradientColor1`, `shimmerGradientColor2` | Custom gradient colors |
| Outgoing bubble | Style | `messageBubbleStyle.outgoing` | `UIColor.systemBlue` |
| Incoming bubble | Style | `messageBubbleStyle.incoming` | `UIColor.systemGray5` |
| Hide avatars | Property | `hideAvatar` | `messageList.hideAvatar = true` |

Check warning on line 1368 in ui-kit/ios/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-list.mdx#L1368

Did you really mean 'hideAvatar'?
| Hide receipts | Property | `hideReceipts` | `messageList.hideReceipts = true` |
| Custom header | View Slot | `set(headerView:)` | See Custom View Slots section |

Expand Down Expand Up @@ -1501,7 +1508,7 @@

*Available since v5.1.22*

Enables the save and unsave options in message actions. The feature must **also** be enabled for your app — the kit checks `CometChat.isSaveMessageEnabled()`.

Check warning on line 1511 in ui-kit/ios/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-list.mdx#L1511

Did you really mean 'unsave'?

| | |
|---|---|
Expand Down Expand Up @@ -1734,6 +1741,17 @@
| Type | `Bool` |
| Default | `false` |

### hideOfflineNotices

*Available since v5.3.0*

Hides the [offline support](/ui-kit/ios/offline-support#hide-offline-notices) notices (a removed unsent message, a full queue, unsent messages that couldn't be recovered), the "Connect to load more" rows and the "Jump to latest" pill. Has no effect while offline support is off.

| | |
|---|---|
| Type | `Bool` |
| Default | `false` |

### hidePinMessageOption

*Available since v5.1.22*
Expand All @@ -1754,7 +1772,7 @@
| Type | `Bool` |
| Default | `false` |

### hideReceipts

Check warning on line 1775 in ui-kit/ios/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-list.mdx#L1775

Did you really mean 'hideReceipts'?

Hides message read receipts (ticks).

Expand Down Expand Up @@ -1849,7 +1867,7 @@
| Type | `Bool` |
| Default | `false` |

### messageAlignment

Check warning on line 1870 in ui-kit/ios/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-list.mdx#L1870

Did you really mean 'messageAlignment'?

Sets the alignment of messages in the list: `.standard` (outgoing on the right, incoming on the left) or `.leftAligned` (all messages on the left).

Expand Down Expand Up @@ -1907,7 +1925,7 @@
| Type | `QuickReactionsConfiguration` |
| Default | `QuickReactionsConfiguration()` |

### reactionsConfiguration

Check warning on line 1928 in ui-kit/ios/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-list.mdx#L1928

Did you really mean 'reactionsConfiguration'?

Configuration object for the reactions feature.

Expand Down Expand Up @@ -1963,7 +1981,7 @@

### textFormatters

Array of text formatters for customizing message text display.

Check warning on line 1984 in ui-kit/ios/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/message-list.mdx#L1984

Did you really mean 'formatters'?

| | |
|---|---|
Expand Down
42 changes: 42 additions & 0 deletions ui-kit/ios/methods.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- **Logout:** `CometChatUIKit.logout(user:result:)`
- **Create user:** `CometChatUIKit.createUser(user:onSuccess:onError:)`
- **Send message:** `CometChatUIKit.sendTextMessage(message:onSuccess:onError:)`, `sendMediaMessage`, `sendCustomMessage`
- **Offline support:** `UIKitSettings().setOfflineConfig(_:)` before `build()`. Off by default. See [Offline Support](/ui-kit/ios/offline-support)
- **Related:** [Getting Started](/ui-kit/ios/getting-started) · [Events](/ui-kit/ios/events) · [SDK Overview](/sdk/ios/overview)
</Info>

Expand Down Expand Up @@ -51,6 +52,7 @@
| **setAutoEstablishSocketConnection** | `Boolean` | Configures if web socket connections will established automatically on app initialization or be done manually, set to true by default |
| **setAIFeatures** | `List<AIExtensionDataSource>` | Sets the AI Features that need to be added in UI Kit |
| **setExtensions** | `List<ExtensionsDataSource>` | Sets the list of extension that need to be added in UI Kit |
| **setOfflineConfig(_:)** | `OfflineConfig` | Turns on offline support by passing the Chat SDK's `OfflineConfig` to the SDK. Off unless the config has `enabled` set to `true`. Needs UI Kit 5.3.0 or later. See [Offline Support](/ui-kit/ios/offline-support) |

#### Example

Expand All @@ -76,6 +78,38 @@
</Tab>
</Tabs>

#### Enable offline support

Offline support is off by default. To turn it on, pass an `OfflineConfig` from the Chat SDK to `setOfflineConfig(_:)` before you call `build()` and `CometChatUIKit.init`. Saved chats then open without a connection, and text messages sent offline are queued until the connection returns.

<Tabs>
<Tab title="Swift">
```swift lines
import CometChatUIKitSwift
import CometChatSDK

let uiKitSettings = UIKitSettings()
.set(appID: "your_appId")

Check warning on line 92 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L92

Did you really mean 'your_appId'?
.set(region: "your_region")

Check warning on line 93 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L93

Did you really mean 'your_region'?
.set(authKey: "your_authKey")

Check warning on line 94 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L94

Did you really mean 'your_authKey'?
.subscribePresenceForAllUsers()
.setOfflineConfig(OfflineConfig(enabled: true))
.build()

CometChatUIKit.init(uiKitSettings: uiKitSettings) { result in
switch result {
case .success:
print("Initialization success")
case .failure(let error):
print("CometChat exception: \(error)")
}
}
```
</Tab>
</Tabs>

UI Kit 5.3.0, the first version with offline support, needs Chat SDK 4.2.1 or later. See [Offline Support](/ui-kit/ios/offline-support) for the requirements, what each component does offline, and the other `OfflineConfig` options.

---

### Login using Auth Key
Expand Down Expand Up @@ -110,7 +144,7 @@
<Tabs>
<Tab title="Swift">
```swift lines
CometChatUIKit.login(authToken: "your_authToken") { (result) in

Check warning on line 147 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L147

Did you really mean 'your_authToken'?
switch result {
case .success(let user):
print("CometChat user logged in: \(user)")
Expand All @@ -131,7 +165,7 @@
<Tabs>
<Tab title="Swift">
```swift lines
let user = User(uid: "uid", name: "user_name")

Check warning on line 168 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L168

Did you really mean 'uid'?

CometChatUIKit.logout(user: user) { (result) in
switch result {
Expand All @@ -145,6 +179,10 @@
</Tab>
</Tabs>

<Note>
With [offline support](/ui-kit/ios/offline-support) on, logout also ends the user's offline session. The Chat SDK deletes the user's offline cache, the UI Kit deletes the avatars it saved and clears the screens on display, and messages still waiting to be sent are discarded. A pending `sendFormMessage`, `sendCardMessage` or `sendSchedulerMessage` calls `onError` once with `ERROR_OFFLINE_MESSAGE_DISCARDED`. Logging in as a different user does the same for the previous user.
</Note>

---

### Create User
Expand Down Expand Up @@ -172,6 +210,10 @@

### Base Message

<Note>
With [offline support](/ui-kit/ios/offline-support) on, `sendTextMessage`, `sendMediaMessage`, `sendCustomMessage`, `sendFormMessage`, `sendCardMessage` and `sendSchedulerMessage` queue the message when there is no connection. It shows in the message list at once and is sent when the connection returns. A media message's files are copied to the device when it is queued. For what the form, card and scheduler completions report while a message is queued or discarded, see [Send completions](/ui-kit/ios/offline-support#send-completions).
</Note>

#### Text Message

To send a text message to a single user or a group, use the `sendTextMessage()` function. This function requires a `TextMessage` object containing the necessary information for delivering the message.
Expand All @@ -179,8 +221,8 @@
<Tabs>
<Tab title="Swift">
```swift lines
let textMessage = TextMessage(receiverUid: "uid", text: message, receiverType: .user)

Check warning on line 224 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L224

Did you really mean 'textMessage'?

Check warning on line 224 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L224

Did you really mean 'uid'?

Check warning on line 224 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L224

Did you really mean 'receiverType'?
textMessage.muid = "\(NSDate().timeIntervalSince1970)"

Check warning on line 225 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L225

Did you really mean 'textMessage'?
textMessage.sentAt = Int(Date().timeIntervalSince1970)
textMessage.senderUid = CometChat.getLoggedInUser()?.uid ?? ""
textMessage.sender = CometChat.getLoggedInUser()
Expand Down Expand Up @@ -230,10 +272,10 @@
<Tabs>
<Tab title="Swift">
```swift lines
var customData = [String: Any]()

Check warning on line 275 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L275

Did you really mean 'customData'?
customData["key"] = "value"

Check warning on line 276 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L276

Did you really mean 'customData'?

let customMessage = CustomMessage(receiverUid: "uid or guid", receiverType: .user, customData: customData, type: "custom message type")

Check warning on line 278 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L278

Did you really mean 'customMessage'?

Check warning on line 278 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L278

Did you really mean 'uid'?

Check warning on line 278 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L278

Did you really mean 'guid'?

Check warning on line 278 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L278

Did you really mean 'receiverType'?

Check warning on line 278 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L278

Did you really mean 'customData'?
customMessage.muid = "\(Int(Date().timeIntervalSince1970))"
customMessage.senderUid = CometChat.getLoggedInUser()?.uid
customMessage.sender = CometChat.getLoggedInUser()
Expand Down Expand Up @@ -291,20 +333,20 @@
<Tabs>
<Tab title="Swift">
```swift lines
let apiAction = APIAction()

Check warning on line 336 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L336

Did you really mean 'apiAction'?
apiAction.url = "https://example.com/api"

Check warning on line 337 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L337

Did you really mean 'apiAction'?
apiAction.method = .POST

let cardAction = ButtonElement()

Check warning on line 340 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L340

Did you really mean 'cardAction'?
cardAction.elementId = "1"
cardAction.action = apiAction
cardAction.buttonText = "Click Me"

let cardMessage = CardMessage(url:"ImageURL", receiverUid:"receiverId", receiverType:.user, cardActions:[cardAction],text: "This is a card")

Check warning on line 345 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L345

Did you really mean 'cardMessage'?

CometChatUIKit.sendCardMessage(cardMessage) { success in
print("Card message sent: \(success)")
} onError: { error in

Check warning on line 349 in ui-kit/ios/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/ios/methods.mdx#L349

Did you really mean 'onError'?
print("CometChat exception: \(error)")
}
```
Expand Down
Loading