Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion sdk/ios/additional-message-filtering.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ To fetch pinned or saved messages, filter with `set(pinned:)` or `set(saved:)` r

## Offline support

With offline support enabled (SDK 4.2.0 or later), `fetchPrevious` and `fetchNext` answer from the on-device cache first. The cache answers a page only when every filter on the request can be computed on the device. A single server-only filter makes the cached page empty, with no error, while the server phase still answers in full.
With offline support enabled (SDK 4.2.1 or later), `fetchPrevious` and `fetchNext` answer from the on-device cache first. The cache answers a page only when every filter on the request can be computed on the device. A single server-only filter makes the cached page empty, with no error, while the server phase still answers in full.

| Builder method | Offline |
|---|---|
Expand Down
2 changes: 1 addition & 1 deletion sdk/ios/ai-moderation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
<Tabs>
<Tab title="Swift">
```swift
let textMessage = TextMessage(receiverUid: receiverUID, text: "Hello, how are you?", receiverType: .user)

Check warning on line 99 in sdk/ios/ai-moderation.mdx

View check run for this annotation

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

sdk/ios/ai-moderation.mdx#L99

Did you really mean 'textMessage'?

Check warning on line 99 in sdk/ios/ai-moderation.mdx

View check run for this annotation

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

sdk/ios/ai-moderation.mdx#L99

Did you really mean 'receiverType'?

CometChat.sendTextMessage(message: textMessage) { sentMessage in
if let message = sentMessage as? TextMessage {
Expand All @@ -111,7 +111,7 @@
</Tab>
<Tab title="Objective-C">
```objc
TextMessage *textMessage = [[TextMessage alloc] initWithReceiverUid:receiverUID text:@"Hello, how are you?" receiverType:ReceiverTypeUser];

Check warning on line 114 in sdk/ios/ai-moderation.mdx

View check run for this annotation

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

sdk/ios/ai-moderation.mdx#L114

Did you really mean 'alloc'?

[CometChat sendTextMessageWithMessage:textMessage onSuccess:^(TextMessage *sentMessage) {
if ([[sentMessage getModerationStatus] isEqualToString:@"pending"]) {
Expand Down Expand Up @@ -159,7 +159,7 @@
```objc
- (void)onMessageModerated:(BaseMessage *)message {
if ([message isKindOfClass:[TextMessage class]]) {
TextMessage *textMessage = (TextMessage *)message;

Check warning on line 162 in sdk/ios/ai-moderation.mdx

View check run for this annotation

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

sdk/ios/ai-moderation.mdx#L162

Did you really mean 'textMessage'?

if ([[textMessage getModerationStatus] isEqualToString:@"approved"]) {
NSLog(@"Message %d approved", message.id);
Expand Down Expand Up @@ -216,14 +216,14 @@
</Tabs>

<Warning>
Always remove listeners when they're no longer needed (e.g., on component unmount or page navigation). Failing to remove listeners can cause memory leaks and duplicate event handling.

Check warning on line 219 in sdk/ios/ai-moderation.mdx

View check run for this annotation

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

sdk/ios/ai-moderation.mdx#L219

Did you really mean 'unmount'?
</Warning>

---

## Offline support

With offline support enabled (SDK 4.2.0 or later), the send overload with `onMessagePending` fires `onMessagePending` first, before the message reaches the server. That status is separate from the moderation status: the message is still sent with a `pending` moderation status, which `getModerationStatus()` reports. If you send without a connection, `onError` with code `ERROR_INTERNET_UNAVAILABLE` means the message is queued, not failed (with `autoSendPendingOnReconnect` on, the default). See [Send While Offline](/sdk/ios/offline-send).
With offline support enabled (SDK 4.2.1 or later), the send overload with `onMessagePending` fires `onMessagePending` first, before the message reaches the server. That status is separate from the moderation status: the message is still sent with a `pending` moderation status, which `getModerationStatus()` reports. If you send without a connection, `onError` with code `ERROR_INTERNET_UNAVAILABLE` means the message is queued, not failed (with `autoSendPendingOnReconnect` on, the default). See [Send While Offline](/sdk/ios/offline-send).

## Next Steps

Expand Down
2 changes: 1 addition & 1 deletion sdk/ios/all-real-time-delegates-listeners.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@

| Method | Information |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| **onGroupMemberJoined(action:** [`Action`](/sdk/reference/messages#action)**, joinedUser:** [`User`](/sdk/reference/entities#user)**, joinedGroup:** [`Group`](/sdk/reference/entities#group)**)** | This method is triggered when a user joins any group. All the members present in the group will receive this event. |

Check warning on line 100 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L100

Did you really mean 'joinedUser'?

Check warning on line 100 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L100

Did you really mean 'joinedGroup'?
| **onGroupMemberLeft(action:** [`Action`](/sdk/reference/messages#action)**, leftUser:** [`User`](/sdk/reference/entities#user)**, leftGroup:** [`Group`](/sdk/reference/entities#group)**)** | This method is triggered when a user who was a member of any group leaves the group. All the members of the group receive this event. |

Check warning on line 101 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L101

Did you really mean 'leftUser'?

Check warning on line 101 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L101

Did you really mean 'leftGroup'?
| **onGroupMemberKicked(action:** [`Action`](/sdk/reference/messages#action)**, kickedUser:** [`User`](/sdk/reference/entities#user)**, kickedBy:** [`User`](/sdk/reference/entities#user)**, kickedFrom:** [`Group`](/sdk/reference/entities#group)**)** | This method is triggered when a user is kicked from a group. All the members including the user receive this event |

Check warning on line 102 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L102

Did you really mean 'kickedUser'?

Check warning on line 102 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L102

Did you really mean 'kickedBy'?

Check warning on line 102 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L102

Did you really mean 'kickedFrom'?
| **onGroupMemberBanned(action:** [`Action`](/sdk/reference/messages#action)**, bannedUser:** [`User`](/sdk/reference/entities#user)**, bannedBy:** [`User`](/sdk/reference/entities#user)**, bannedFrom:** [`Group`](/sdk/reference/entities#group)**)** | This method is triggered when a user is banned from a group. All the members including the user receive this event |

Check warning on line 103 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L103

Did you really mean 'bannedUser'?

Check warning on line 103 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L103

Did you really mean 'bannedBy'?

Check warning on line 103 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L103

Did you really mean 'bannedFrom'?
| **onGroupMemberUnbanned(action:** [`Action`](/sdk/reference/messages#action)**, unbannedUser:** [`User`](/sdk/reference/entities#user)**, unbannedBy:** [`User`](/sdk/reference/entities#user)**, unbannedFrom:** [`Group`](/sdk/reference/entities#group)**)** | This method is triggered when a user is banned from a group. All the members of the group receive this event. |

Check warning on line 104 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L104

Did you really mean 'unbannedUser'?

Check warning on line 104 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L104

Did you really mean 'unbannedBy'?

Check warning on line 104 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L104

Did you really mean 'unbannedFrom'?
| **onGroupMemberScopeChanged(action:** [`Action`](/sdk/reference/messages#action)**, updatedBy:** [`User`](/sdk/reference/entities#user)**, updatedUser:** [`User`](/sdk/reference/entities#user)**, scopeChangedTo: String, scopeChangedFrom: String, group:** [`Group`](/sdk/reference/entities#group)**)** | This method is triggered when the scope of any Group Member has been changed. All the members that are a part of that group receive this event |

Check warning on line 105 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L105

Did you really mean 'updatedBy'?

Check warning on line 105 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L105

Did you really mean 'updatedUser'?
| **onMemberAddedToGroup(action:** [`Action`](/sdk/reference/messages#action)**, addedby:** [`User`](/sdk/reference/entities#user)**, userAdded:** [`User`](/sdk/reference/entities#user)**, addedTo:** [`Group`](/sdk/reference/entities#group)**)** | This method is triggered when a user is added to any group. All the members including the user himself receive this event. |

Check warning on line 106 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L106

Did you really mean 'addedby'?

Check warning on line 106 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L106

Did you really mean 'userAdded'?

Check warning on line 106 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L106

Did you really mean 'addedTo'?

You can receive live events related to groups. In order to receive group events, you must add protocol conformance `CometChatGroupDelegate` as shown below:

Expand All @@ -116,23 +116,23 @@
print("\(joinedUser.name) joined the group \(joinedGroup.name).")
}

func onGroupMemberLeft(action: ActionMessage, leftUser: User, leftGroup: Group) {

Check warning on line 119 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L119

Did you really mean 'leftUser'?

Check warning on line 119 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L119

Did you really mean 'leftGroup'?
print("\(leftUser.name) left the group \(leftGroup.name).")
}

func onGroupMemberKicked(action: ActionMessage, kickedUser: User, kickedBy: User, kickedFrom: Group) {

Check warning on line 123 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L123

Did you really mean 'kickedUser'?

Check warning on line 123 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L123

Did you really mean 'kickedBy'?

Check warning on line 123 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L123

Did you really mean 'kickedFrom'?
print("\(kickedUser.name) kicked from the group \(kickedFrom.name) by \(kickedBy.name).")
}

func onGroupMemberBanned(action: ActionMessage, bannedUser: User, bannedBy: User, bannedFrom: Group) {

Check warning on line 127 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L127

Did you really mean 'bannedUser'?

Check warning on line 127 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L127

Did you really mean 'bannedBy'?

Check warning on line 127 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L127

Did you really mean 'bannedFrom'?
print("\(bannedUser.name) banned from the group \(bannedFrom.name) by \(bannedBy.name).")
}

func onGroupMemberUnbanned(action: ActionMessage, unbannedUser: User, unbannedBy: User, unbannedFrom: Group) {

Check warning on line 131 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L131

Did you really mean 'unbannedUser'?

Check warning on line 131 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L131

Did you really mean 'unbannedBy'?

Check warning on line 131 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L131

Did you really mean 'unbannedFrom'?
print("\(unbannedUser.name) unbanned from the group \(unbannedFrom.name) by \(unbannedBy.name).")
}

func onGroupMemberScopeChanged(action: ActionMessage, scopeChangeduser: User, scopeChangedBy: User, scopeChangedTo: String, scopeChangedFrom: String, group: Group) {

Check warning on line 135 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L135

Did you really mean 'scopeChangeduser'?
print("\(scopeChangeduser.name) scope changed from \(scopeChangedFrom) to \(scopeChangedTo) by \(scopeChangedBy.name) in the group \(group.name).")
}
}
Expand Down Expand Up @@ -201,8 +201,8 @@
| **onTextMessageReceived(textMessage:** [`TextMessage`](/sdk/reference/messages#textmessage)**)** | This event is triggered when a Text Message is received. |
| **onMediaMessageReceived(mediaMessage:** [`MediaMessage`](/sdk/reference/messages#mediamessage)**)** | This event is triggered when a Media Message is received. |
| **onCustomMessageReceived(customMessage:** [`CustomMessage`](/sdk/reference/messages#custommessage)**)** | This event is triggered when a Custom Message is received. |
| **onTypingStarted(_ typingDetails:** [`TypingIndicator`](/sdk/reference/auxiliary#typingindicator)**)** | This event is triggered when a user starts typing in a user/group conversation. |

Check warning on line 204 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L204

Did you really mean 'typingDetails'?
| **onTypingEnded(_ typingDetails:** [`TypingIndicator`](/sdk/reference/auxiliary#typingindicator)**)** | This event is triggered when a user stops typing in a user/group conversation. |

Check warning on line 205 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L205

Did you really mean 'typingDetails'?
| **onTransisentMessageReceived(_ message:** [`TransientMessage`](/sdk/reference/auxiliary#transientmessage)**)** | This event is triggered when a transient message is received. |
| **onMessagesDelivered(receipt:** [`MessageReceipt`](/sdk/reference/auxiliary#messagereceipt)**)** | This event is triggered when a set of messages are marked as delivered for any particular conversation. |
| **onMessagesRead(receipt:** [`MessageReceipt`](/sdk/reference/auxiliary#messagereceipt)**)** | This event is triggered when a set of messages are marked as read for any particular conversation. |
Expand Down Expand Up @@ -250,11 +250,11 @@
print("Message deleted successfully.")
}

func onTypingStarted(_ typingDetails: TypingIndicator) {

Check warning on line 253 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L253

Did you really mean 'typingDetails'?
print("Typing started received successfully")
}

func onTypingEnded(_ typingDetails: TypingIndicator) {

Check warning on line 257 in sdk/ios/all-real-time-delegates-listeners.mdx

View check run for this annotation

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

sdk/ios/all-real-time-delegates-listeners.mdx#L257

Did you really mean 'typingDetails'?
print("Typing ended received successfully")
}

Expand Down Expand Up @@ -575,7 +575,7 @@

## Offline listeners

With offline support enabled (SDK 4.2.0 or later), `CometChatMessageDelegate` also receives `onMessagesSynced(_:)`. It fires after the SDK catches up on reconnect and carries updates to already-cached messages that changed while offline: reactions, edits, deletes and receipts. Messages that arrived while offline still come through the typed callbacks such as `onTextMessageReceived`.
With offline support enabled (SDK 4.2.1 or later), `CometChatMessageDelegate` also receives `onMessagesSynced(_:)`. It fires after the SDK catches up on reconnect and carries updates to already-cached messages that changed while offline: reactions, edits, deletes and receipts. Messages that arrived while offline still come through the typed callbacks such as `onTextMessageReceived`.

Four more listeners report what the SDK does on the device rather than events from the server. Each is documented with examples on its own page.

Expand Down
2 changes: 1 addition & 1 deletion sdk/ios/block-users.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@

## Block Users

Block users to prevent all communication with them. Use `blockUsers()` with an array of UIDs.

Check warning on line 30 in sdk/ios/block-users.mdx

View check run for this annotation

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

sdk/ios/block-users.mdx#L30

Did you really mean 'UIDs'?

<Tabs>
<Tab title="Swift">
```swift
let blockUsers = ["UID1", "UID2", "UID3"]

Check warning on line 35 in sdk/ios/block-users.mdx

View check run for this annotation

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

sdk/ios/block-users.mdx#L35

Did you really mean 'blockUsers'?

CometChat.blockUsers(blockUsers, onSuccess: {

Check warning on line 37 in sdk/ios/block-users.mdx

View check run for this annotation

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

sdk/ios/block-users.mdx#L37

Did you really mean 'onSuccess'?

print("Blocked user successfully.")

}, onError: { (error) in

Check warning on line 41 in sdk/ios/block-users.mdx

View check run for this annotation

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

sdk/ios/block-users.mdx#L41

Did you really mean 'onError'?

print("Blocked user failed with error: \\(error?.errorDescription)")

Expand All @@ -64,22 +64,22 @@
</Tab>
</Tabs>

Returns a dictionary with UIDs as keys and `"success"` or `"fail"` as values based on if the block operation for each UID was successful.

Check warning on line 67 in sdk/ios/block-users.mdx

View check run for this annotation

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

sdk/ios/block-users.mdx#L67

Did you really mean 'UIDs'?

## Unblock Users

Unblock previously blocked users using `unblockUsers()` with an array of UIDs.

Check warning on line 71 in sdk/ios/block-users.mdx

View check run for this annotation

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

sdk/ios/block-users.mdx#L71

Did you really mean 'UIDs'?

<Tabs>
<Tab title="Swift">
```swift
let unblockUsers = ["UID1", "UID2", "UID3"]

Check warning on line 76 in sdk/ios/block-users.mdx

View check run for this annotation

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

sdk/ios/block-users.mdx#L76

Did you really mean 'unblockUsers'?

CometChat.unblockUsers(unblockUsers, onSuccess: { (users) in

Check warning on line 78 in sdk/ios/block-users.mdx

View check run for this annotation

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

sdk/ios/block-users.mdx#L78

Did you really mean 'onSuccess'?

print("Unblocked user successfully.")

}, onError: { (error) in

Check warning on line 82 in sdk/ios/block-users.mdx

View check run for this annotation

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

sdk/ios/block-users.mdx#L82

Did you really mean 'onError'?

print("Unblocked user failed with error: \\(error?.errorDescription)")

Expand All @@ -105,7 +105,7 @@
</Tab>
</Tabs>

Returns a dictionary with UIDs as keys and `"success"` or `"fail"` as values based on if the unblock operation for each UID was successful.

Check warning on line 108 in sdk/ios/block-users.mdx

View check run for this annotation

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

sdk/ios/block-users.mdx#L108

Did you really mean 'UIDs'?

## Get List of Blocked Users

Expand All @@ -131,7 +131,7 @@
<Tab title="Swift">
```swift
let blockedUserRequest = BlockedUserRequest.BlockedUserRequestBuilder
.set(searchKeyword: "abc")

Check warning on line 134 in sdk/ios/block-users.mdx

View check run for this annotation

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

sdk/ios/block-users.mdx#L134

Did you really mean 'abc'?
.set(limit: 20)
.build();
```
Expand All @@ -150,7 +150,7 @@
<Tab title="Swift">
```swift
let blockedUserRequest = BlockedUserRequest.BlockedUserRequestBuilder
.set(searchKeyword: "abc")

Check warning on line 153 in sdk/ios/block-users.mdx

View check run for this annotation

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

sdk/ios/block-users.mdx#L153

Did you really mean 'abc'?
.set(limit: 20)
.set(direction: .both)
.build();
Expand All @@ -169,7 +169,7 @@

print("Blocked users: \\(users)")

}, onError : { (error) in

Check warning on line 172 in sdk/ios/block-users.mdx

View check run for this annotation

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

sdk/ios/block-users.mdx#L172

Did you really mean 'onError'?

print("Error while fetching the blocked user request: \\(error?.errorDescription)")

Expand Down Expand Up @@ -206,7 +206,7 @@

## Offline support

With offline support enabled (SDK 4.2.0 or later), `fetchNext` on a `BlockedUserRequest` has an overload that first delivers `onCachedUsers` from the SDK's own blocked-users list. The SDK refreshes that list on login and on each catch-up sync, and updates it when you call `blockUsers` or `unblockUsers`. The first cached page holds the whole list and later pages are empty. Then `onServerUsers` delivers the live page to reconcile by `uid`.
With offline support enabled (SDK 4.2.1 or later), `fetchNext` on a `BlockedUserRequest` has an overload that first delivers `onCachedUsers` from the SDK's own blocked-users list. The SDK refreshes that list on login and on each catch-up sync, and updates it when you call `blockUsers` or `unblockUsers`. The first cached page holds the whole list and later pages are empty. Then `onServerUsers` delivers the live page to reconcile by `uid`.

The cached page is empty when no users are blocked or when `set(searchKeyword:)` is set. Offline, the read ends with `onError`, code `ERROR_INTERNET_UNAVAILABLE`, after the cached page. Blocking and unblocking need a connection and are not queued. See [Show Cached Data](/sdk/ios/offline-cached-data).

Expand Down
2 changes: 1 addition & 1 deletion sdk/ios/campaigns.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
| NotificationFeedItem | A single notification in the feed. Contains Card Schema JSON in its `content` field, a category for filtering, timestamps, and metadata. |
| NotificationCategory | A category label used for filter chips (e.g., "Promotions", "Updates"). |
| Card Schema JSON | The fully rendered card layout (images, text, buttons) inside `NotificationFeedItem.content`. Passed directly to the CometChat Cards renderer. |
| PushNotification | Represents a campaign push notification payload received via APNs. |

Check warning on line 198 in sdk/ios/campaigns.mdx

View check run for this annotation

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

sdk/ios/campaigns.mdx#L198

Did you really mean 'APNs'?

---

Expand All @@ -208,7 +208,7 @@
1. Fetch feed items via `NotificationFeedRequest`
2. For each item, extract `item.content` — this is the Card Schema JSON
3. Pass to the Cards renderer (`CometChatCardView`)
4. The renderer produces a native UIKit view from the JSON

Check warning on line 211 in sdk/ios/campaigns.mdx

View check run for this annotation

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

sdk/ios/campaigns.mdx#L211

Did you really mean 'UIKit'?

### Card Schema JSON Structure

Expand All @@ -221,7 +221,7 @@
{ "type": "button", "id": "btn_1", "label": "Shop Now", "action": { "type": "openUrl", "url": "https://..." } }
],
"style": { "background": {"light": "#FFFFFF", "dark": "#1E1E1E"}, "borderRadius": 12, "padding": 16 },
"fallbackText": "Flash Sale! Shop Now: https://..."

Check warning on line 224 in sdk/ios/campaigns.mdx

View check run for this annotation

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

sdk/ios/campaigns.mdx#L224

Did you really mean 'fallbackText'?
}
```

Expand Down Expand Up @@ -249,8 +249,8 @@
| ------ | ---- | ------- | ----------- |
| `set(limit:)` | `Int` | 20 | Items per page. |
| `set(readState:)` | `FeedReadState` | All | Filter by `.read` or `.unread`. Omit for all. |
| `set(category:)` | `String` | nil | Filter by category name. Sent as `templateCategory` query param. If `categoryId` is also set, `categoryId` takes priority. |

Check warning on line 252 in sdk/ios/campaigns.mdx

View check run for this annotation

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

sdk/ios/campaigns.mdx#L252

Did you really mean 'param'?
| `set(categoryId:)` | `String` | nil | Filter by category ID. Sent as `templateCategory` query param. Takes priority over `category` if both are set. |

Check warning on line 253 in sdk/ios/campaigns.mdx

View check run for this annotation

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

sdk/ios/campaigns.mdx#L253

Did you really mean 'param'?
| `set(channelId:)` | `String` | nil | Filter by channel. |
| `set(tags:)` | `[String]` | nil | Filter by tags (comma-joined). |
| `set(dateFrom:)` | `String` | nil | ISO 8601 date — items sent on or after. |
Expand All @@ -277,7 +277,7 @@

### Offline support

With offline support enabled (SDK 4.2.0 or later), `fetchNext` on a `NotificationFeedRequest` has an overload that first delivers `onCachedNotificationFeedItems` from the device (empty when nothing was recorded), then `onServerNotificationFeedItems` with the live page to reconcile by item `id`. Offline, the read ends with `onError`, code `ERROR_INTERNET_UNAVAILABLE`, after the cached page.
With offline support enabled (SDK 4.2.1 or later), `fetchNext` on a `NotificationFeedRequest` has an overload that first delivers `onCachedNotificationFeedItems` from the device (empty when nothing was recorded), then `onServerNotificationFeedItems` with the live page to reconcile by item `id`. Offline, the read ends with `onError`, code `ERROR_INTERNET_UNAVAILABLE`, after the cached page.

The cached page replays what the server last returned for the same builder settings. `set(limit:)`, `set(readState:)`, `set(category:)`, `set(categoryId:)`, `set(channelId:)`, `set(tags:)`, `set(dateFrom:)` and `set(dateTo:)` are all part of the request. See [Show Cached Data](/sdk/ios/offline-cached-data).

Expand Down Expand Up @@ -428,11 +428,11 @@

## Push Notification Tracking

When a campaign push notification arrives via APNs, use these methods to report delivery and click engagement.

Check warning on line 431 in sdk/ios/campaigns.mdx

View check run for this annotation

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

sdk/ios/campaigns.mdx#L431

Did you really mean 'APNs'?

### Setting Up Notification Service Extension

1. In Xcode: **File → New → Target** → select **Notification Service Extension**.

Check warning on line 435 in sdk/ios/campaigns.mdx

View check run for this annotation

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

sdk/ios/campaigns.mdx#L435

Did you really mean 'Xcode'?
2. Enable **App Groups** on both your main app target and the extension target with the same group ID (e.g., `group.com.yourapp.cometchat`).
3. Add `CometChatSDK` as a dependency to the extension target.

Expand Down
2 changes: 1 addition & 1 deletion sdk/ios/connection-status.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<Tabs>
<Tab title="Swift">
```swift
var connectionStatus = CometChat.getConnectionStatus?.value

Check warning on line 45 in sdk/ios/connection-status.mdx

View check run for this annotation

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

sdk/ios/connection-status.mdx#L45

Did you really mean 'connectionStatus'?
```
</Tab>
</Tabs>
Expand Down Expand Up @@ -105,7 +105,7 @@

## Offline support

With offline support enabled (SDK 4.2.0 or later), your app keeps working without a connection. Cached chats are shown instantly, and messages you send with the `onMessagePending` overloads are queued and delivered automatically on reconnect. See [Show Cached Data](/sdk/ios/offline-cached-data) and [Send While Offline](/sdk/ios/offline-send).
With offline support enabled (SDK 4.2.1 or later), your app keeps working without a connection. Cached chats are shown instantly, and messages you send with the `onMessagePending` overloads are queued and delivered automatically on reconnect. See [Show Cached Data](/sdk/ios/offline-cached-data) and [Send While Offline](/sdk/ios/offline-send).

## Next Steps

Expand Down
2 changes: 1 addition & 1 deletion sdk/ios/group-kick-member.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Kick Member From A Group"
sidebarTitle: "Kick & Ban Members"
description: "Learn how to kick, ban, and unban group members, fetch banned member lists, and receive real-time events using the CometChat iOS SDK."

Check warning on line 4 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L4

Did you really mean 'unban'?
---

<Accordion title="AI Integration Quick Reference">
Expand Down Expand Up @@ -37,12 +37,12 @@
<Tabs>
<Tab title="Swift">
```swift
let uid = "cometchat-uid-2"

Check warning on line 40 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L40

Did you really mean 'uid'?
let guid = "cometchat-guid-1"

Check warning on line 41 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L41

Did you really mean 'guid'?

CometChat.kickGroupMember(UID: uid, GUID: guid, onSuccess: { (response) in

Check warning on line 43 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L43

Did you really mean 'uid'?

Check warning on line 43 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L43

Did you really mean 'guid'?

Check warning on line 43 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L43

Did you really mean 'onSuccess'?
print("\(uid) is kicked from the group \(guid) successfully.")

Check warning on line 44 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L44

Did you really mean 'uid'?

Check warning on line 44 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L44

Did you really mean 'guid'?
}, onError: { (error) in

Check warning on line 45 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L45

Did you really mean 'onError'?
print("Error: \(error?.errorDescription)")
})
```
Expand Down Expand Up @@ -75,12 +75,12 @@
<Tabs>
<Tab title="Swift">
```swift
let uid = "cometchat-uid-2"

Check warning on line 78 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L78

Did you really mean 'uid'?
let guid = "cometchat-guid-1"

Check warning on line 79 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L79

Did you really mean 'guid'?

CometChat.banGroupMember(UID: uid, GUID: guid, onSuccess: { (response) in

Check warning on line 81 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L81

Did you really mean 'onSuccess'?
print("\(uid) is banned from the group \(guid) successfully.")

Check warning on line 82 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L82

Did you really mean 'uid'?

Check warning on line 82 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L82

Did you really mean 'guid'?
}, onError: { (error) in

Check warning on line 83 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L83

Did you really mean 'onError'?
print("Error: \(error?.errorDescription)")
})
```
Expand All @@ -101,9 +101,9 @@

The banned user will be no longer part of the group and can not perform any actions in the group. A banned user cannot rejoin the same group without being unbanned.

## Unban a Group Member

Check warning on line 104 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L104

Did you really mean 'Unban'?

Admins or Moderators can unban a previously banned member using `unbanGroupMember()`.

Check warning on line 106 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L106

Did you really mean 'unban'?

| Parameter | Description |
|-----------|-------------|
Expand All @@ -116,9 +116,9 @@
let uid = "cometchat-uid-2"
let guid = "cometchat-guid-1"

CometChat.unbanGroupMember(UID: uid, GUID: guid, onSuccess: { (response) in

Check warning on line 119 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L119

Did you really mean 'onSuccess'?
print("\(uid) is unbanned from the group \(guid) successfully.")
}, onError: { (error) in

Check warning on line 121 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L121

Did you really mean 'onError'?
print("Error: \(error?.errorDescription)")
})
```
Expand Down Expand Up @@ -166,7 +166,7 @@
```swift
let bannedGroupMembersRequest = BannedGroupMembersRequest.BannedGroupMembersRequestBuilder(guid: "cometchat-guid-1")
.set(limit: 30)
.set(searchKeyword: "abc")

Check warning on line 169 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L169

Did you really mean 'abc'?
.build()
```
</Tab>
Expand Down Expand Up @@ -203,7 +203,7 @@
for bannedMember in groupMembers {
print("Banned member: \(bannedMember.stringValue())")
}
}, onError: { (error) in

Check warning on line 206 in sdk/ios/group-kick-member.mdx

View check run for this annotation

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

sdk/ios/group-kick-member.mdx#L206

Did you really mean 'onError'?
print("Error: \(error?.errorDescription)")
})
```
Expand All @@ -228,7 +228,7 @@

### Offline support

With offline support enabled (SDK 4.2.0 or later), `fetchNext` on a `BannedGroupMembersRequest` has an overload that first delivers `onCachedBannedGroupMembers` from the device, then `onServerBannedGroupMembers` with the live page to reconcile by `uid`. Offline, the read ends with `onError`, code `ERROR_INTERNET_UNAVAILABLE`, after the cached page. A request that uses a server-only filter records nothing, so its cached page is always empty.
With offline support enabled (SDK 4.2.1 or later), `fetchNext` on a `BannedGroupMembersRequest` has an overload that first delivers `onCachedBannedGroupMembers` from the device, then `onServerBannedGroupMembers` with the live page to reconcile by `uid`. Offline, the read ends with `onError`, code `ERROR_INTERNET_UNAVAILABLE`, after the cached page. A request that uses a server-only filter records nothing, so its cached page is always empty.

| Builder method | Offline |
|---|---|
Expand Down
2 changes: 1 addition & 1 deletion sdk/ios/mentions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
<Tabs>
<Tab title="Swift (User)">
```swift
let messageText = "Hello <@uid:cometchat-uid-1>, how are you?"

Check warning on line 48 in sdk/ios/mentions.mdx

View check run for this annotation

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

sdk/ios/mentions.mdx#L48

Did you really mean 'messageText'?
let textMessage = TextMessage(receiverUid: "cometchat-uid-2", text: messageText, receiverType: .user)

Check warning on line 49 in sdk/ios/mentions.mdx

View check run for this annotation

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

sdk/ios/mentions.mdx#L49

Did you really mean 'textMessage'?

Check warning on line 49 in sdk/ios/mentions.mdx

View check run for this annotation

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

sdk/ios/mentions.mdx#L49

Did you really mean 'messageText'?

Check warning on line 49 in sdk/ios/mentions.mdx

View check run for this annotation

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

sdk/ios/mentions.mdx#L49

Did you really mean 'receiverType'?

CometChat.sendTextMessage(message: textMessage) { message in

Check warning on line 51 in sdk/ios/mentions.mdx

View check run for this annotation

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

sdk/ios/mentions.mdx#L51

Did you really mean 'textMessage'?
print("Mentioned users: \(message.mentionedUsers)")
} onError: { error in

Check warning on line 53 in sdk/ios/mentions.mdx

View check run for this annotation

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

sdk/ios/mentions.mdx#L53

Did you really mean 'onError'?
print("Error: \(error?.errorDescription)")
}
```
Expand Down Expand Up @@ -89,7 +89,7 @@
<Tabs>
<Tab title="Swift (User)">
```swift
let messagesRequest = MessagesRequest(builder: MessagesRequest.MessageRequestBuilder()

Check warning on line 92 in sdk/ios/mentions.mdx

View check run for this annotation

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

sdk/ios/mentions.mdx#L92

Did you really mean 'messagesRequest'?
.set(uid: "cometchat-uid-2")
.set(limit: 50)
.mentionsWithTagInfo(true))
Expand All @@ -100,7 +100,7 @@
print("User tags: \(user.tags)")
}
}
} onError: { error in

Check warning on line 103 in sdk/ios/mentions.mdx

View check run for this annotation

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

sdk/ios/mentions.mdx#L103

Did you really mean 'onError'?
print("Error: \(error?.errorDescription)")
}
```
Expand Down Expand Up @@ -130,7 +130,7 @@
<Tabs>
<Tab title="Swift (User)">
```swift
let messagesRequest = MessagesRequest(builder: MessagesRequest.MessageRequestBuilder()

Check warning on line 133 in sdk/ios/mentions.mdx

View check run for this annotation

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

sdk/ios/mentions.mdx#L133

Did you really mean 'messagesRequest'?
.set(uid: "cometchat-uid-2")
.set(limit: 50)
.mentionsWithBlockedInfo(true))
Expand All @@ -142,7 +142,7 @@
print("Blocked by me: \(user.blockedByMe)")
}
}
} onError: { error in

Check warning on line 145 in sdk/ios/mentions.mdx

View check run for this annotation

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

sdk/ios/mentions.mdx#L145

Did you really mean 'onError'?
print("Error: \(error?.errorDescription)")
}
```
Expand Down Expand Up @@ -179,14 +179,14 @@
<Tabs>
<Tab title="Swift">
```swift
let wasMentioned = message.mentionedMe // Returns Bool

Check warning on line 182 in sdk/ios/mentions.mdx

View check run for this annotation

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

sdk/ios/mentions.mdx#L182

Did you really mean 'wasMentioned'?
```
</Tab>
</Tabs>

| Property | Type | Description |
|----------|------|-------------|
| mentionedMe | `Bool` | `true` if logged-in user was mentioned |

Check warning on line 189 in sdk/ios/mentions.mdx

View check run for this annotation

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

sdk/ios/mentions.mdx#L189

Did you really mean 'mentionedMe'?

---

Expand All @@ -194,7 +194,7 @@

| Property | Type | Description |
|----------|------|-------------|
| uid | `String` | Unique user identifier |

Check warning on line 197 in sdk/ios/mentions.mdx

View check run for this annotation

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

sdk/ios/mentions.mdx#L197

Did you really mean 'uid'?
| name | `String` | User's display name |
| avatar | `String?` | User's avatar URL |
| tags | `[String]` | User's tags (with `mentionsWithTagInfo`) |
Expand All @@ -205,7 +205,7 @@

## Offline support

With offline support enabled (SDK 4.2.0 or later), a message with mentions is sent like any other message: use the overload with `onMessagePending`, `onMessageSent` and `onError`. Offline, `onError` with code `ERROR_INTERNET_UNAVAILABLE` means the message is queued, not failed (with `autoSendPendingOnReconnect` on, the default). Mention fetches run in two phases: `onCachedMessages` delivers the cached page first (even when empty), then `onServerMessages`. See [Send While Offline](/sdk/ios/offline-send) and [Show Cached Data](/sdk/ios/offline-cached-data).
With offline support enabled (SDK 4.2.1 or later), a message with mentions is sent like any other message: use the overload with `onMessagePending`, `onMessageSent` and `onError`. Offline, `onError` with code `ERROR_INTERNET_UNAVAILABLE` means the message is queued, not failed (with `autoSendPendingOnReconnect` on, the default). Mention fetches run in two phases: `onCachedMessages` delivers the cached page first (even when empty), then `onServerMessages`. See [Send While Offline](/sdk/ios/offline-send) and [Show Cached Data](/sdk/ios/offline-cached-data).

## Next Steps

Expand Down
2 changes: 1 addition & 1 deletion sdk/ios/offline-cached-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
All callbacks are delivered on the main thread.

<Note>
With offline support **off**, these overloads behave like the classic call: the cached phase never fires, and the server result arrives in `onServer…` instead of `onSuccess`. Nothing changes until you enable offline (see [Enable Offline Support](/sdk/ios/offline-enable)). Requires SDK **4.2.0** or later.
With offline support **off**, these overloads behave like the classic call: the cached phase never fires, and the server result arrives in `onServer…` instead of `onSuccess`. Nothing changes until you enable offline (see [Enable Offline Support](/sdk/ios/offline-enable)). Requires SDK **4.2.1** or later.
</Note>

<Note>
Expand Down Expand Up @@ -177,8 +177,8 @@
}
}

let messageLoader = MessageLoader()

Check warning on line 180 in sdk/ios/offline-cached-data.mdx

View check run for this annotation

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

sdk/ios/offline-cached-data.mdx#L180

Did you really mean 'messageLoader'?
CometChat.getMessageDetails(messageId, listener: messageLoader)

Check warning on line 181 in sdk/ios/offline-cached-data.mdx

View check run for this annotation

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

sdk/ios/offline-cached-data.mdx#L181

Did you really mean 'messageLoader'?
```

<Note>
Expand Down
15 changes: 4 additions & 11 deletions sdk/ios/offline-enable.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,34 +34,27 @@
<Steps>

<Step title="Requirements">
Offline support requires CometChat iOS SDK **4.2.0** or later. Update the dependency:
Offline support requires CometChat iOS SDK **4.2.1** or later, installed with Swift Package Manager. Set the `https://github.com/cometchat/chat-sdk-ios.git` dependency rule to `Up to Next Major Version` with version `4.2.1`.

<Tabs>
<Tab title="CocoaPods">
```ruby
pod 'CometChatSDK', '4.2.0'
```
</Tab>
<Tab title="Swift Package Manager">
Set the `https://github.com/cometchat/chat-sdk-ios.git` dependency rule to `Up to Next Major Version` with version `4.2.0`.
</Tab>
</Tabs>
<Note>
The `CometChatSDK` CocoaPod stops at 4.1.10. New Chat SDK releases ship through Swift Package Manager only, so offline support can't be installed with CocoaPods.
</Note>

If you are new to the SDK, complete the [standard setup](/sdk/ios/setup) first; the steps below only add offline configuration to your existing `init`.
</Step>

<Step title="Build an OfflineConfig">
Create an `OfflineConfig` and enable it. Every other field has a default, so set only what you need. In Swift you can use the initializer with default arguments. The `Builder` works from both Swift and Objective-C.

Check warning on line 47 in sdk/ios/offline-enable.mdx

View check run for this annotation

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

sdk/ios/offline-enable.mdx#L47

Did you really mean 'initializer'?

<Tabs>
<Tab title="Initializer">
```swift
let offlineConfig = OfflineConfig(enabled: true)

Check warning on line 52 in sdk/ios/offline-enable.mdx

View check run for this annotation

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

sdk/ios/offline-enable.mdx#L52

Did you really mean 'offlineConfig'?
```
</Tab>
<Tab title="Builder">
```swift
let offlineConfig = OfflineConfig.Builder()

Check warning on line 57 in sdk/ios/offline-enable.mdx

View check run for this annotation

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

sdk/ios/offline-enable.mdx#L57

Did you really mean 'offlineConfig'?
.setEnabled(true)
.build()
```
Expand Down
6 changes: 3 additions & 3 deletions sdk/ios/offline-encryption.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Encrypt the Cache"
sidebarTitle: "Encrypt the Cache"
description: "Encrypt the offline message cache at rest with SQLCipher, choose what happens when encryption cannot run, and inspect the live encryption status with the CometChat iOS SDK."

Check warning on line 4 in sdk/ios/offline-encryption.mdx

View check run for this annotation

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

sdk/ios/offline-encryption.mdx#L4

Did you really mean 'SQLCipher'?
---

{/* TL;DR for Agents and Quick Reference */}
Expand Down Expand Up @@ -29,15 +29,15 @@

</Accordion>

Offline support keeps the logged-in user's messages in a local database on the device. Turn encryption on to store that database **encrypted at rest** using [SQLCipher](https://www.zetetic.net/sqlcipher/). Encryption is **opt-in** and off by default; nothing changes until you call `setEncryption(true)`. The minimum SDK version is **4.2.0**.
Offline support keeps the logged-in user's messages in a local database on the device. Turn encryption on to store that database **encrypted at rest** using [SQLCipher](https://www.zetetic.net/sqlcipher/). Encryption is **opt-in** and off by default; nothing changes until you call `setEncryption(true)`. The minimum SDK version is **4.2.1**.

<Note>
Encryption covers the **message database only**. Downloaded and outgoing media files (photos, voice notes, documents) stay as ordinary unencrypted files on disk, because their local paths are handed to native image and video loaders. See [What is and isn't encrypted](#what-is-and-isn-t-encrypted).
Encryption covers the **message database only**. Downloaded and outgoing media files (photos, voice notes, documents) stay as ordinary unencrypted files on disk, because their local paths are handed to native image and video loaders. See [What gets encrypted](#what-gets-encrypted).

Check warning on line 35 in sdk/ios/offline-encryption.mdx

View check run for this annotation

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

sdk/ios/offline-encryption.mdx#L35

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

## No extra dependency

iOS needs no separate cipher dependency. The SDK ships its own SQLCipher build and keeps it isolated from your app, so it does not clash with an app's own SQLite, SQLCipher, GRDB or FMDB. There is nothing to add to your `Podfile` or Swift package.

Check warning on line 40 in sdk/ios/offline-encryption.mdx

View check run for this annotation

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

sdk/ios/offline-encryption.mdx#L40

Did you really mean 'SQLCipher'?

Check warning on line 40 in sdk/ios/offline-encryption.mdx

View check run for this annotation

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

sdk/ios/offline-encryption.mdx#L40

Did you really mean 'SQLCipher'?

## Turn on encryption

Expand All @@ -46,7 +46,7 @@
<Tabs>
<Tab title="Builder">
```swift
let offlineConfig = OfflineConfig.Builder()

Check warning on line 49 in sdk/ios/offline-encryption.mdx

View check run for this annotation

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

sdk/ios/offline-encryption.mdx#L49

Did you really mean 'offlineConfig'?
.setEnabled(true)
.setEncryption(true)
.setEncryptionFailureBehavior(.onlineOnly)
Expand All @@ -55,7 +55,7 @@
</Tab>
<Tab title="Initializer">
```swift
let offlineConfig = OfflineConfig(

Check warning on line 58 in sdk/ios/offline-encryption.mdx

View check run for this annotation

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

sdk/ios/offline-encryption.mdx#L58

Did you really mean 'offlineConfig'?
enabled: true,
encryption: true,
encryptionFailureBehavior: .onlineOnly
Expand All @@ -68,10 +68,10 @@

`encryptionFailureBehavior` decides what the cache does when encryption **cannot be applied at all** on this build or device — the cipher engine is not linked into the build, for example. Because the engine ships inside the SDK this should not happen in a normal app, but the setting is there so you decide the outcome rather than the SDK. It governs only that case: a transient failure (such as a locked Keychain) still retries, and a lost or wrong key self-heals by wiping and rebuilding the cache **encrypted**.

| `CometChat.EncryptionFailureBehavior` | Behavior | Writes plaintext? |

Check warning on line 71 in sdk/ios/offline-encryption.mdx

View check run for this annotation

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

sdk/ios/offline-encryption.mdx#L71

Did you really mean 'plaintext'?
|---|---|---|
| `.onlineOnly` *(default)* | Do not open a local cache at all — the session runs server-only. Makes a setup mistake visible: offline simply does not work until it is fixed. | No |
| `.plaintextFallback` | Open an **unencrypted** cache so offline keeps working, and log the downgrade at error level. | Yes |

Check warning on line 74 in sdk/ios/offline-encryption.mdx

View check run for this annotation

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

sdk/ios/offline-encryption.mdx#L74

Did you really mean 'unencrypted'?

<Warning>
`.plaintextFallback` means cached message content may be stored **unencrypted** on disk whenever encryption cannot run. This availability-over-guarantee trade is wrong for compliance use — keep the default `.onlineOnly` if cached content must never be written in the clear.
Expand Down Expand Up @@ -101,17 +101,17 @@
| `enabled` | `Bool` | What was **configured** (`OfflineConfig.encryption`), not what was achieved. `false` whenever offline is switched off for the app. |
| `atRest` | `String` | Coverage actually achieved: `"SQLCIPHER"` once an encrypted open is proven, otherwise `"NONE"`. |
| `keyStorage` | `String` | `"KEYSTORE"` when the key was resolved from the iOS Keychain; `"NONE"` when this session holds no key. Read `NONE` as "no key in use", not "no key exists". |
| `cipherAvailable` | `Bool` | Whether the SQLCipher engine is present and linked in this process. `false` when encryption is off. |

Check warning on line 104 in sdk/ios/offline-encryption.mdx

View check run for this annotation

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

sdk/ios/offline-encryption.mdx#L104

Did you really mean 'SQLCipher'?
| `cipher` | `String` / `NSNull` | The engine's `cipher_version` once an encrypted open is proven, else `NSNull`. |
| `leakage` | `String` | What encryption at rest never covers — the downloaded media files stored outside the database. |

The string values are also available as constants on `CometChat.OfflineEncryptionTier` (for example `OfflineEncryptionTier.atRestSqlcipher`).

<Tip>
The single most useful support signal is `enabled == true` with `atRest == "NONE"`: encryption was switched on but is not in effect — the cache is dormant, still opening, or was opened unencrypted under `.plaintextFallback`.

Check warning on line 111 in sdk/ios/offline-encryption.mdx

View check run for this annotation

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

sdk/ios/offline-encryption.mdx#L111

Did you really mean 'unencrypted'?
</Tip>

## What is and isn't encrypted
## What gets encrypted

| Data | Encrypted at rest? |
|---|---|
Expand All @@ -122,7 +122,7 @@

## Cache resets on key loss

If the key can no longer decrypt the stored database, the SDK wipes the local cache and rebuilds it **encrypted** — it never silently falls back to plaintext for a cache that could be encrypted. Any unsent messages still queued in the outbox at that point are lost. They lived inside the unreadable database, so they cannot be counted or reported one by one: `pendingMessagesLost` is `CometChat.offlinePendingCountUnknown` (`-1`). When the reset is `.encryptionChanged` instead, each queued message fails with reason `.discarded` and `pendingMessagesLost` is the exact count, unless the old database could not be read.

Check warning on line 125 in sdk/ios/offline-encryption.mdx

View check run for this annotation

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

sdk/ios/offline-encryption.mdx#L125

Did you really mean 'plaintext'?

Register an `OfflineCacheResetListener` to be told when this happens:

Expand All @@ -134,8 +134,8 @@
}
}

let resetObserver = CacheResetObserver() // keep a strong reference

Check warning on line 137 in sdk/ios/offline-encryption.mdx

View check run for this annotation

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

sdk/ios/offline-encryption.mdx#L137

Did you really mean 'resetObserver'?
CometChat.addOfflineCacheResetListener("LISTENER_ID", resetObserver)

Check warning on line 138 in sdk/ios/offline-encryption.mdx

View check run for this annotation

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

sdk/ios/offline-encryption.mdx#L138

Did you really mean 'resetObserver'?
```

The encryption-related reasons are `.keyLost`, `.wrongKey`, `.corrupted`, `.escalated`, and `.encryptionChanged` (you turned encryption on or off between launches, which also discards any queued messages). `pendingMessagesLost` is `CometChat.offlinePendingCountUnknown` (`-1`) when the unsent messages could not be counted. See [Stay in Sync](/sdk/ios/offline-sync) for the full cache-reset flow and the complete list of reasons, and the [API Reference](/sdk/ios/offline-reference) for every field and enum.
Expand Down
2 changes: 1 addition & 1 deletion sdk/ios/offline-media-caching.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@

</Accordion>

With offline support on, the SDK can cache attachment bytes durably on the device so media stays viewable offline — even after the server's presigned URL has expired. This page covers the caching modes, what downloads automatically, how to read cached bytes, and how to download media on demand.

Check warning on line 38 in sdk/ios/offline-media-caching.mdx

View check run for this annotation

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

sdk/ios/offline-media-caching.mdx#L38

Did you really mean 'presigned'?

<Note>
Media caching applies only while offline support is active for the logged-in user (`CometChat.isOfflineEnabled()` is `true`). See [Enable Offline Support](/sdk/ios/offline-enable).
Media caching applies only while offline support is active for the logged-in user (`CometChat.isOfflineEnabled()` is `true`). See [Enable Offline Support](/sdk/ios/offline-enable). Requires SDK **4.2.1** or later.
</Note>

## Caching modes
Expand Down Expand Up @@ -66,7 +66,7 @@

In `.auto` mode, media bytes are downloaded and cached automatically on the two live receive paths:

- a **realtime** media message received while connected, and

Check warning on line 69 in sdk/ios/offline-media-caching.mdx

View check run for this annotation

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

sdk/ios/offline-media-caching.mdx#L69

Did you really mean 'realtime'?
- opening a chat **online** (the server read refreshes and caches its media).

A media message that arrives through a reconnect catch-up [sync](/sdk/ios/offline-sync) is cached as **metadata only** and renders as a placeholder; its bytes download the next time you open that chat online. This holds in both `.auto` and `.off`.
Expand Down Expand Up @@ -135,8 +135,8 @@
func onMediaDownloadFailed(_ attachment: Attachment?, _ error: CometChatException) { }
}

let mediaObserver = MediaObserver() // keep a strong reference

Check warning on line 138 in sdk/ios/offline-media-caching.mdx

View check run for this annotation

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

sdk/ios/offline-media-caching.mdx#L138

Did you really mean 'mediaObserver'?
CometChat.addMediaDownloadListener("MEDIA_LISTENER", mediaObserver)

Check warning on line 139 in sdk/ios/offline-media-caching.mdx

View check run for this annotation

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

sdk/ios/offline-media-caching.mdx#L139

Did you really mean 'mediaObserver'?
```

Remove the listener with `CometChat.removeMediaDownloadListener("MEDIA_LISTENER")`. The background `MediaDownloadListener` carries no progress callback — progress is reported only on the explicit `downloadMedia` path above.
Expand Down
4 changes: 2 additions & 2 deletions sdk/ios/offline-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Accordion title="AI Integration Quick Reference">

```swift
// Offline support is OFF by default. Turn it on at init (SDK 4.2.0 or later).
// Offline support is OFF by default. Turn it on at init (SDK 4.2.1 or later).
let offlineConfig = OfflineConfig.Builder()
.setEnabled(true)
.build()
Expand All @@ -29,7 +29,7 @@
Offline support keeps the logged-in user's conversations and messages on the device so your app can show them instantly, lets the user send messages while disconnected, and catches up automatically when the connection returns. It is **off by default** — nothing changes in your app until you enable it ([Enable Offline Support](/sdk/ios/offline-enable)). This page explains the mental model; the other pages show the exact APIs.

<Note>
Offline support ships in CometChat iOS SDK **4.2.0** or later.
Offline support ships in CometChat iOS SDK **4.2.1** or later.
</Note>

## How it works
Expand All @@ -38,7 +38,7 @@

<Steps>
<Step title="Cache first, then server">
Every read goes through the local cache first. For list reads the SDK delivers the cached page immediately, even when it is empty. Single-item lookups (`getMessageDetails`, `getConversation`) deliver a cached result only when that item is already cached. The SDK then fetches from the server and delivers the fresh result. Your UI renders what is on the device without waiting for the network, then updates when the server responds. See [Show Cached Data](/sdk/ios/offline-cached-data).

Check warning on line 41 in sdk/ios/offline-overview.mdx

View check run for this annotation

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

sdk/ios/offline-overview.mdx#L41

Did you really mean 'lookups'?
</Step>
<Step title="A durable send outbox">
A message sent while offline is saved to a durable outbox and reported as pending instead of failing. It survives app restarts and is sent, in the order it was composed, when the connection returns. See [Send While Offline](/sdk/ios/offline-send).
Expand Down
2 changes: 1 addition & 1 deletion sdk/ios/offline-reference.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Offline Configuration & API Reference"
sidebarTitle: "Configuration & API Reference"
description: "A complete reference for the offline configuration options, public methods, listeners, enums, model fields, and error codes with the CometChat iOS SDK."

Check warning on line 4 in sdk/ios/offline-reference.mdx

View check run for this annotation

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

sdk/ios/offline-reference.mdx#L4

Did you really mean 'enums'?
---

{/* TL;DR for Agents and Quick Reference */}
Expand Down Expand Up @@ -32,7 +32,7 @@

</Accordion>

This page is the full surface of CometChat's offline support on iOS: configuration options, public methods, listeners, enums, model fields, and error codes. The minimum SDK version is **4.2.0**, and offline support is **off by default**. For task-focused guides see [Enable Offline Support](/sdk/ios/offline-enable), [Show Cached Data](/sdk/ios/offline-cached-data), [Send While Offline](/sdk/ios/offline-send), [Stay in Sync](/sdk/ios/offline-sync), [Media Caching](/sdk/ios/offline-media-caching), and [Encrypt the Cache](/sdk/ios/offline-encryption).
This page is the full surface of CometChat's offline support on iOS: configuration options, public methods, listeners, enums, model fields, and error codes. The minimum SDK version is **4.2.1**, and offline support is **off by default**. For task-focused guides see [Enable Offline Support](/sdk/ios/offline-enable), [Show Cached Data](/sdk/ios/offline-cached-data), [Send While Offline](/sdk/ios/offline-send), [Stay in Sync](/sdk/ios/offline-sync), [Media Caching](/sdk/ios/offline-media-caching), and [Encrypt the Cache](/sdk/ios/offline-encryption).

## OfflineConfig options

Expand Down
2 changes: 1 addition & 1 deletion sdk/ios/offline-send.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
With offline support enabled, a message you send while the device has no connection is **durably queued on the device** instead of failing. It keeps its place across an app restart and is sent automatically once the connection is back and stable (with `autoSendPendingOnReconnect` on, the default). This page shows the offline-aware send overloads, how to read a message's status, how to inspect and recover the send queue, and the queue limits.

<Note>
Offline support is **off by default** and requires SDK **4.2.0** or newer. Queuing only happens once you [enable it](/sdk/ios/offline-enable); with offline off, a send over no connection fails exactly as before.
Offline support is **off by default** and requires SDK **4.2.1** or newer. Queuing only happens once you [enable it](/sdk/ios/offline-enable); with offline off, a send over no connection fails exactly as before.
</Note>

The classic `sendTextMessage(message:onSuccess:onError:)` and its media, custom and interactive siblings are unchanged. They never queue and never report a pending stage; to get the offline behaviour, call the overloads below.
Expand Down Expand Up @@ -118,7 +118,7 @@

| Reason | When |
|---|---|
| `.transient` | A temporary server error (a completed 5xx response or 429), no answer after 5 automatic reconnect attempts, or, with `autoSendPendingOnReconnect` off, no answer at all. Retryable. |

Check warning on line 121 in sdk/ios/offline-send.mdx

View check run for this annotation

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

sdk/ios/offline-send.mdx#L121

Did you really mean 'Retryable'?
| `.permanent` | The server rejected the message, or the error was not recognized. A manual retry will not help. |
| `.queueFull` | A new send was refused because the queue is full (count cap). |
| `.queueOverflow` | An older queued message was evicted to admit a newer one (`.dropOldest` only). |
Expand Down Expand Up @@ -210,7 +210,7 @@

## Auto-send on Reconnect

By default, queued pending messages are sent automatically, in the order they were composed, when the realtime connection is re-established. This is controlled by `OfflineConfig.autoSendPendingOnReconnect` (default `true`); see [Enable Offline Support](/sdk/ios/offline-enable) and the [reference](/sdk/ios/offline-reference). A queued message that keeps getting no answer is retried on each reconnect, up to 5 times, then becomes failed (`.transient`). With it off, nothing retries a queued message on reconnect — a send that gets no answer becomes failed (`.transient`), which you recover with `retryMessage`.

Check warning on line 213 in sdk/ios/offline-send.mdx

View check run for this annotation

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

sdk/ios/offline-send.mdx#L213

Did you really mean 'realtime'?

Reconnect also runs a catch-up sync for received messages — see [Stay in Sync](/sdk/ios/offline-sync).

Expand Down
4 changes: 2 additions & 2 deletions sdk/ios/offline-sync.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
When the device comes back online, the SDK runs a **catch-up sync**: it refreshes the conversation list, then replays everything that changed in your messages since the last sync, and merges the results into the local cache. This page covers how to observe that sync, trigger one on demand, and manage the cache it maintains.

<Note>
Everything on this page is a no-op unless offline support is active for the logged-in user (`CometChat.isOfflineEnabled()` is `true`). See [Enable Offline Support](/sdk/ios/offline-enable).
Everything on this page is a no-op unless offline support is active for the logged-in user (`CometChat.isOfflineEnabled()` is `true`). See [Enable Offline Support](/sdk/ios/offline-enable). Requires SDK **4.2.1** or later.
</Note>

## How catch-up works
Expand Down Expand Up @@ -163,7 +163,7 @@
| Rejection code (`CometChatConstants.Errors`) | Meaning |
|---|---|
| `ERROR_OFFLINE_SYNC_IN_PROGRESS` | A sync (automatic or manual) is already running. |
| `ERROR_OFFLINE_SYNC_COOLDOWN` | A sync ended less than 15 seconds ago; the error description carries the remaining cooldown in milliseconds. |
| `ERROR_OFFLINE_SYNC_COOLDOWN` | A sync started too recently; the error description carries the remaining cooldown in milliseconds (retry-after). |

Check warning on line 166 in sdk/ios/offline-sync.mdx

View check run for this annotation

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

sdk/ios/offline-sync.mdx#L166

Did you really mean 'cooldown'?
| `ERROR_OFFLINE_DISABLED` | A user is logged in but offline support is not active. |
| `ERROR_USER_NOT_LOGGED_IN` | Nobody is logged in. |

Expand Down
2 changes: 1 addition & 1 deletion sdk/ios/reactions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
```swift
CometChat.addReaction(messageId: 148, reaction: "😴") { message in
print("Reactions: \(message.getReactions())")
} onError: { error in

Check warning on line 38 in sdk/ios/reactions.mdx

View check run for this annotation

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

sdk/ios/reactions.mdx#L38

Did you really mean 'onError'?
print("Error: \(error?.errorDescription)")
}
```
Expand All @@ -59,7 +59,7 @@
```swift
CometChat.removeReaction(messageId: 148, reaction: "😴") { message in
print("Reactions: \(message.getReactions())")
} onError: { error in

Check warning on line 62 in sdk/ios/reactions.mdx

View check run for this annotation

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

sdk/ios/reactions.mdx#L62

Did you really mean 'onError'?
print("Error: \(error?.errorDescription)")
}
```
Expand All @@ -83,7 +83,7 @@
<Tabs>
<Tab title="Swift">
```swift
let reactionsRequest = ReactionsRequestBuilder()

Check warning on line 86 in sdk/ios/reactions.mdx

View check run for this annotation

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

sdk/ios/reactions.mdx#L86

Did you really mean 'reactionsRequest'?
.set(limit: 30)
.set(messageId: 148)
.build()
Expand All @@ -93,7 +93,7 @@
print("Reaction: \(reaction.reaction)")
print("Reacted by: \(reaction.reactedBy?.name ?? "")")
}
} onError: { error in

Check warning on line 96 in sdk/ios/reactions.mdx

View check run for this annotation

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

sdk/ios/reactions.mdx#L96

Did you really mean 'onError'?
print("Error: \(error?.errorDescription)")
}
```
Expand Down Expand Up @@ -129,7 +129,7 @@
for reaction in reactions {
print("Reaction: \(reaction.stringValue())")
}
} onError: { error in

Check warning on line 132 in sdk/ios/reactions.mdx

View check run for this annotation

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

sdk/ios/reactions.mdx#L132

Did you really mean 'onError'?
print("Error: \(error?.errorDescription)")
}
```
Expand Down Expand Up @@ -190,7 +190,7 @@
<Tabs>
<Tab title="Swift">
```swift
for reactionCount in message.reactions {

Check warning on line 193 in sdk/ios/reactions.mdx

View check run for this annotation

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

sdk/ios/reactions.mdx#L193

Did you really mean 'reactionCount'?
print("Reaction: \(reactionCount.reaction)")
print("Reacted by me: \(reactionCount.reactedByMe)")
}
Expand All @@ -210,8 +210,8 @@
<Tab title="Swift">
```swift
CometChat.updateMessageWithReactionInfo(
baseMessage: BaseMessage,

Check warning on line 213 in sdk/ios/reactions.mdx

View check run for this annotation

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

sdk/ios/reactions.mdx#L213

Did you really mean 'baseMessage'?
messageReaction: MessageReaction,

Check warning on line 214 in sdk/ios/reactions.mdx

View check run for this annotation

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

sdk/ios/reactions.mdx#L214

Did you really mean 'messageReaction'?
action: ReactionAction
) -> BaseMessage
```
Expand All @@ -222,8 +222,8 @@

| Parameter | Type | Description |
|-----------|------|-------------|
| baseMessage | [`BaseMessage`](/sdk/reference/messages#basemessage) | The message to update |

Check warning on line 225 in sdk/ios/reactions.mdx

View check run for this annotation

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

sdk/ios/reactions.mdx#L225

Did you really mean 'baseMessage'?
| messageReaction | `MessageReaction` | Reaction info from event |

Check warning on line 226 in sdk/ios/reactions.mdx

View check run for this annotation

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

sdk/ios/reactions.mdx#L226

Did you really mean 'messageReaction'?
| action | `ReactionAction` | `.REACTION_ADDED` or `.REACTION_REMOVED` |

### ReactionAction Enum Values
Expand Down Expand Up @@ -398,7 +398,7 @@

## Offline support

With offline support enabled (SDK 4.2.0 or later), `fetchNext` and `fetchPrevious` on a `ReactionsRequest` have overloads that deliver `onCachedReactions` first (even when empty) and then `onServerReactions`. Offline, the read ends with `onError`, code `ERROR_INTERNET_UNAVAILABLE`, after the cached page. Each direction keeps its own cached pages.
With offline support enabled (SDK 4.2.1 or later), `fetchNext` and `fetchPrevious` on a `ReactionsRequest` have overloads that deliver `onCachedReactions` first (even when empty) and then `onServerReactions`. Offline, the read ends with `onError`, code `ERROR_INTERNET_UNAVAILABLE`, after the cached page. Each direction keeps its own cached pages.

The cached phase replays the page this request last received from the server online, for the same builder settings. It does not run those settings as a query against the cache. Adding or removing a reaction needs a connection and is not queued. Real-time reaction events arrive on `CometChatMessageDelegate`, as described above. See [Show Cached Data](/sdk/ios/offline-cached-data).

Expand Down
Loading