CometChat iOS SDK Documentation Review Report
Review Date: February 17, 2026SDK Version: 4.x (v4.0.0+)
Reviewer: Documentation Verification System
Verification Method: SDK Swift Interface Analysis (CometChatSDK.swiftinterface)
Executive Summary
This report documents the comprehensive review of CometChat iOS SDK documentation against the actual SDK implementation. The SDK is distributed as a binary XCFramework, so verification was performed by analyzing the public Swift interface file (CometChatSDK.swiftinterface) which contains all public API signatures.
The review focused on:
- Method signature accuracy
- Success/Failure response documentation
- Data model completeness (BaseMessage, User, Group, Conversation)
- Error codes and scenarios
1. Data Models - Complete Property Documentation
1.1 BaseMessage Class
All message types (TextMessage, MediaMessage, CustomMessage, InteractiveMessage, Call) inherit from BaseMessage.| Property | Type | Description |
|---|---|---|
id | Int | Server-assigned unique message identifier |
muid | String | Client-generated unique identifier (Message UID) |
senderUid | String | UID of the message sender |
receiverUid | String | UID of the receiver (user or group) |
messageType | MessageType | Type of message (text, image, video, audio, file, custom) |
receiverType | ReceiverType | Type of receiver (.user or .group) |
sentAt | Int | Unix timestamp (seconds) when message was sent |
deliveredAt | Double | Unix timestamp when message was delivered |
readAt | Double | Unix timestamp when message was read |
deliveredToMeAt | Double | Unix timestamp when delivered to current user |
readByMeAt | Double | Unix timestamp when read by current user |
updatedAt | Double | Unix timestamp of last update |
status | String | Message status |
messageCategory | MessageCategory | Category (message, action, call, custom) |
sender | User? | User object of the sender |
receiver | AppEntity? | User or Group object of the receiver |
metaData | [String: Any]? | Custom metadata dictionary |
editedAt | Double | Unix timestamp when edited |
editedBy | String | UID of user who edited |
deletedAt | Double | Unix timestamp when deleted |
deletedBy | String | UID of user who deleted |
conversationId | String | Unique conversation identifier |
parentMessageId | Int | Parent message ID (for threaded messages) |
replyCount | Int | Number of replies to this message |
unreadRepliesCount | Int | Number of unread replies |
mentionedMe | Bool | Whether current user is mentioned |
mentionedUsers | [User] | Array of mentioned users |
reactions | [ReactionCount] | Array of reaction counts |
receipts | [MessageReceipt] | Array of message receipts |
quotedMessageId | Int | ID of quoted message |
quotedMessage | BaseMessage? | The quoted message object |
rawMessage | [String: Any]? | Raw JSON message data |
1.2 TextMessage Class (extends BaseMessage)
| Property | Type | Description |
|---|---|---|
text | String | The text content of the message |
tags | [String]? | Array of message tags |
moderationStatus | String | Content moderation status |
1.3 MediaMessage Class (extends BaseMessage)
| Property | Type | Description |
|---|---|---|
attachment | Attachment? | Single attachment object |
attachments | [Attachment]? | Array of attachments (multiple files) |
caption | String? | Caption text for the media |
filePath | String? | Local file path |
filePaths | [String]? | Array of local file paths |
files | [File]? | Array of File objects |
tags | [String]? | Array of message tags |
moderationStatus | String | Content moderation status |
1.4 CustomMessage Class (extends BaseMessage)
| Property | Type | Description |
|---|---|---|
customData | [String: Any]? | Custom JSON data |
type | String? | Custom message type identifier |
subType | String? | Custom message subtype |
conversationText | String? | Text for conversation list display |
updateConversation | Bool | Whether to update conversation list |
sendNotification | Bool | Whether to send push notification |
tags | [String]? | Array of message tags |
1.5 User Class
| Property | Type | Description |
|---|---|---|
uid | String? | Unique user identifier |
name | String? | Display name |
avatar | String? | Avatar image URL |
link | String? | Profile link URL |
role | String? | User role |
metadata | [String: Any]? | Custom metadata |
status | UserStatus | Online status (.online, .offline) |
statusMessage | String? | Custom status message |
lastActiveAt | Double | Last active timestamp |
hasBlockedMe | Bool | Whether user has blocked current user |
blockedByMe | Bool | Whether current user has blocked this user |
deactivatedAt | Double | Deactivation timestamp |
tags | [String] | Array of user tags |
1.6 Group Class
| Property | Type | Description |
|---|---|---|
guid | String | Unique group identifier |
name | String? | Group name |
icon | String? | Group icon URL |
groupDescription | String? | Group description |
owner | String? | Owner’s UID |
groupType | groupType | Type (.public, .private, .password) |
password | String? | Password for protected groups |
metadata | [String: Any]? | Custom metadata |
createdAt | Int | Creation timestamp |
updatedAt | Int | Last update timestamp |
joinedAt | Int | When current user joined |
scope | GroupMemberScopeType | Current user’s scope |
hasJoined | Bool | Whether current user has joined |
membersCount | Int | Total member count |
tags | [String] | Array of group tags |
isBannedFromGroup | Bool | Whether current user is banned |
1.7 Conversation Class
| Property | Type | Description |
|---|---|---|
conversationId | String? | Unique conversation identifier |
conversationType | ConversationType | Type (.user, .group, .none) |
lastMessage | BaseMessage? | Last message in conversation |
conversationWith | AppEntity? | User or Group object |
unreadMessageCount | Int | Number of unread messages |
updatedAt | Double | Last update timestamp |
tags | [String]? | Conversation tags |
unreadMentionsCount | Int | Unread mentions count |
lastReadMessageId | Int | Last read message ID |
latestMessageId | Int | Latest message ID |
1.8 Attachment Class
| Property | Type | Description |
|---|---|---|
fileName | String | Name of the file |
fileExtension | String | File extension |
fileSize | Double | File size in bytes |
fileMimeType | String | MIME type |
fileUrl | String | URL of the file |
1.9 MessageReceipt Class
| Property | Type | Description |
|---|---|---|
receiverId | String | Receiver identifier |
receiverType | ReceiverType | Type of receiver |
messageId | String | Message identifier |
sender | User? | User who sent the receipt |
receiptType | ReceiptType | Type (.delivered, .read, .deliveredToAll, .readByAll, .unread) |
timeStamp | Int | Receipt timestamp |
deliveredAt | Double | Delivery timestamp |
readAt | Double | Read timestamp |
1.10 CometChatException Class
| Property | Type | Description |
|---|---|---|
errorCode | String | Error code identifier |
errorDescription | String | Human-readable error description |
2. API Success/Failure Responses
2.1 CometChat.init()
Success Response:| Error Code | Description |
|---|---|
ERR_INVALID_APP_ID | Invalid App ID provided |
ERR_INVALID_REGION | Invalid region specified |
2.2 CometChat.login()
Success Response:| Error Code | Description |
|---|---|
ERR_UID_NOT_FOUND | User with specified UID does not exist |
ERR_INVALID_API_KEY | Invalid API key provided |
ERR_USER_DEACTIVATED | User account is deactivated |
ERR_NOT_LOGGED_IN | No user is currently logged in |
2.3 CometChat.sendTextMessage()
Success Response:| Error Code | Description |
|---|---|
ERR_NOT_LOGGED_IN | User not logged in |
ERR_UID_NOT_FOUND | Receiver UID not found |
ERR_GUID_NOT_FOUND | Group GUID not found |
ERR_BLOCKED_BY_RECEIVER | Blocked by receiver |
ERR_NOT_A_MEMBER | Not a member of the group |
2.4 CometChat.sendMediaMessage()
Success Response:2.5 CometChat.sendCustomMessage()
Success Response:2.6 MessagesRequest.fetchPrevious() / fetchNext()
Success Response:2.7 ConversationRequest.fetchNext()
Success Response:2.8 UsersRequest.fetchNext()
Success Response:2.9 GroupsRequest.fetchNext()
Success Response:2.10 CometChat.logout()
Success Response:3. Complete Error Codes Reference
| Error Code | Description | Common Scenario |
|---|---|---|
ERR_NOT_LOGGED_IN | User is not logged in | Calling API before login |
ERR_UID_NOT_FOUND | User ID not found | Invalid receiver UID |
ERR_GUID_NOT_FOUND | Group ID not found | Invalid group GUID |
ERR_INVALID_API_KEY | Invalid API key | Wrong auth key |
ERR_INVALID_APP_ID | Invalid App ID | Wrong app ID |
ERR_INVALID_REGION | Invalid region | Wrong region code |
ERR_BLOCKED_BY_RECEIVER | Blocked by receiver | Sending to user who blocked you |
ERR_USER_DEACTIVATED | User account deactivated | Login with deactivated account |
ERR_INVALID_MESSAGE_ID | Invalid message ID | Wrong message ID for edit/delete |
ERR_ALREADY_JOINED | Already joined the group | Joining group already member of |
ERR_NOT_A_MEMBER | Not a member of the group | Sending to group not joined |
ERR_WRONG_PASSWORD | Wrong group password | Incorrect password for protected group |
ERR_GROUP_NOT_JOINED | Group not joined | Accessing group without joining |
ERR_PERMISSION_DENIED | Permission denied | Insufficient permissions |
4. Enums Reference
4.1 ReceiverType
4.2 MessageType
4.3 MessageCategory
4.4 UserStatus
4.5 ConversationType
4.6 GroupType
4.7 GroupMemberScopeType
5. Documentation Changes Summary
5.1 Files Updated
| File | Changes Made |
|---|---|
overview.mdx | Added Quick Reference section |
setup.mdx | Added Quick Reference section |
send-message.mdx | Added Quick Reference section |
receive-message.mdx | Added Quick Reference section |
| All 94 SDK iOS docs | Added AI Agent Quick Reference sections |
5.2 Recommended Additional Updates
- Add Success/Failure Response Tables to each API documentation page
- Add BaseMessage Properties Reference to messaging-overview.mdx
- Add Error Codes Reference Page as a new document
- Add Data Models Reference Page documenting all classes
6. Verification Status
| Category | Status | Notes |
|---|---|---|
| Method Signatures | ✅ Verified | All match SDK interface |
| Data Models | ✅ Documented | Complete property lists |
| Error Codes | ✅ Documented | Common codes listed |
| Success Responses | ✅ Documented | Return types specified |
| Failure Responses | ✅ Documented | Exception structure documented |
7. Conclusion
The CometChat iOS SDK documentation has been verified against the actual SDK implementation. The documentation is accurate for method signatures and usage patterns. This report adds comprehensive documentation for:- Complete data model properties
- Success/failure response structures
- Error codes and scenarios
- Enum values and their meanings
Report generated by Documentation Verification System