diff --git a/sdk/ios/delivery-read-receipts.mdx b/sdk/ios/delivery-read-receipts.mdx
index 2b7c536f..954a85e6 100644
--- a/sdk/ios/delivery-read-receipts.mdx
+++ b/sdk/ios/delivery-read-receipts.mdx
@@ -175,6 +175,47 @@ Starting v3, the messages will not be marked delivered internally by the SDK. Yo
+---
+
+## Mark Conversation as Delivered
+
+You can mark an entire conversation as delivered for a user or group using the `markConversationAsDelivered` method. This method takes the below parameters as input:
+
+| Parameter | Information |
+| ------------------ | ------------------------------------------------------------------------------ |
+| `conversationWith` | The ID of the user (UID) or group (GUID) for the conversation. |
+| `conversationType` | Type of the conversation. Could be either `user` or `group`. |
+| `onSuccess` | The callback listener that will be called on success. |
+| `onError` | The callback listener that will be called on error. |
+
+This method will mark all messages in the conversation as delivered.
+
+
+
+```swift
+CometChat.markConversationAsDelivered(conversationWithId: (conversation.conversationWith as? User)?.uid, receiverType: .user) { message in
+ print(message)
+} onError: { error in
+ print(error.errorDescription)
+}
+```
+
+
+
+```swift
+CometChat.markConversationAsDelivered(conversationWithId: (conversation.conversationWith as? Group)?.guid, receiverType: .group) { message in
+ print(message)
+} onError: { error in
+ print(error.errorDescription)
+}
+```
+
+
+
+
+
+---
+
## Mark Messages as Read
*In other words, as a recipient, how do I inform the sender I've read a message?*
@@ -357,44 +398,95 @@ Starting v3, the `markAsRead()` method working with v2.x is deprecated and will
+---
+
+## Mark Conversation as Read
+
+You can mark an entire conversation as read for a user or group using the `markConversationAsRead` method. This method takes the below parameters as input:
+
+| Parameter | Information |
+| ------------------ | ------------------------------------------------------------------------------ |
+| `conversationWith` | The ID of the user (UID) or group (GUID) for the conversation. |
+| `conversationType` | Type of the conversation. Could be either `user` or `group`. |
+| `onSuccess` | The callback listener that will be called on success. |
+| `onError` | The callback listener that will be called on error. |
+
+This method will mark all messages in the conversation as read.
+
+
+
+```swift
+CometChat.markConversationAsRead(conversationWithId: (conversation.conversationWith as? User)?.uid, receiverType: .user) { message in
+ print(message)
+} onError: { error in
+ print(error.errorDescription)
+}
+```
+
+
+
+
+```swift
+CometChat.markConversationAsRead(conversationWithId: (conversation.conversationWith as? Group)?.guid, receiverType: .group) { message in
+ print(message)
+} onError: { error in
+ print(error.errorDescription)
+}
+```
+
+
+
+
+
+---
+
## Mark Messages as Unread
-The Mark as Unread feature allows users to designate specific messages or conversations as unread, even if they have been previously viewed.
+The Mark message as Unread feature allows users to designate specific messages or conversations as unread, even if they have been previously viewed.
This feature is valuable for users who want to revisit and respond to important messages or conversations later, ensuring they don't forget or overlook them.
-In other words, how I can mark message as unread?
+In other words, how I can mark a message as unread?
-You can mark the messages for a particular conversation as unread using the `markAsUnread()` method. This method takes the below parameters as input:
+You can mark the messages for a particular conversation as unread using the `markMessageAsUnread` method. This method takes the below parameters as input:
-| Field | Information |
-| ------------------- | ----------------------------------------------- |
-| conversationId | id of the conversation |
-| conversationType | type of conversation (user/group) |
-| lastMessage | last message in the conversation |
-| conversationWith | User or Group object containing the details |
-| unreadMessageCount | unread message count for the conversation |
-| unreadMentionsCount | count of unread mentions in the conversation |
-| lastReadMessageId | ID of the last read message in the conversation |
+| Parameter | Information |
+| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| message | To mark a message as unread, pass a non-null `BaseMessage` instance to the `markMessageAsUnread` function. All messages below that message in the conversation will contribute to the unread messages count. Example: When User B sends User A a total of 10 messages, and User A invokes the `markMessageAsUnread(baseMessage: BaseMessage, receiverType: CometChat.ReceiverType, onSuccess: (Conversation) -> Void, onError: (CometChatException?) -> ())` method on the fifth message, all messages located below the fifth message within the conversation list will be designated as unread. This results in a notification indicating there are 5 unread messages in the conversation list. |
+| onSuccess | The callback listener that will be called on success. |
+| onError | The callback listener that will be called on error. |
+
+
+You cannot mark your own messages as unread. This method only works for messages received from other users.
+
-
+
```swift
-let txt = TextMessage(receiverUid: "cometchat-uid-3", text: "this is unread count test", receiverType: .user)
-txt.id = 3 // the message with id 3 will be marked unread. ID is required.
-txt.sender = User(uid: "cometchat-uid-2", name: "George Alan")
-
-CometChat.markAsUnread(baseMessage: txt) {
- print("markAsUnread executed successfully: on message with ID: \(txt.id) and text \(txt.text)")
+CometChat.markMessageAsUnread(baseMessage: message, receiverType: .user) { conversation in
+ print(conversation)
+ print(conversation.unreadMessageCount)
} onError: { error in
- print("markAsUnread not executed error: \(error?.errorDescription)")
+ print(error?.errorDescription)
}
```
+
+```swift
+CometChat.markMessageAsUnread(baseMessage: message, receiverType: .group) { conversation in
+ print(conversation)
+ print(conversation.unreadMessageCount)
+} onError: { error in
+ print(error?.errorDescription)
+}
+```
+
+---
+
## Receive Delivery & Read Receipts
*In other words, as a recipient, how do I know when a message I sent has been delivered or read by someone?*
diff --git a/sdk/ios/overview.mdx b/sdk/ios/overview.mdx
index 8143f370..d524723c 100644
--- a/sdk/ios/overview.mdx
+++ b/sdk/ios/overview.mdx
@@ -75,7 +75,7 @@ platform :ios, '12.0'
use_frameworks!
target 'YourApp' do
- pod 'CometChatSDK', '4.0.72'
+ pod 'CometChatSDK', '4.0.73'
end
```
diff --git a/sdk/ios/setup.mdx b/sdk/ios/setup.mdx
index 1e70703a..71ff8164 100644
--- a/sdk/ios/setup.mdx
+++ b/sdk/ios/setup.mdx
@@ -53,7 +53,7 @@ platform :ios, '11.0'
use_frameworks!
target 'MyApp' do
- pod 'CometChatSDK', '4.0.72'
+ pod 'CometChatSDK', '4.0.73'
end
```
@@ -96,7 +96,7 @@ To install **Swift Packages** you can use Xcode package manager\*\*.\*\*
-3. Once the pop-up appears, enter the github repository address in the search bar [`https://github.com/cometchat/chat-sdk-ios.git`](https://github.com/cometchat/chat-sdk-ios.git) and set dependency rule to `Up to Next Major Version` and set version as `4.0.72` . Then click on the **Add Package** button.
+3. Once the pop-up appears, enter the github repository address in the search bar [`https://github.com/cometchat/chat-sdk-ios.git`](https://github.com/cometchat/chat-sdk-ios.git) and set dependency rule to `Up to Next Major Version` and set version as `4.0.73` . Then click on the **Add Package** button.
diff --git a/ui-kit/ios/core-features.mdx b/ui-kit/ios/core-features.mdx
index ce0d2f50..04b19da1 100644
--- a/ui-kit/ios/core-features.mdx
+++ b/ui-kit/ios/core-features.mdx
@@ -48,6 +48,20 @@ CometChat's Read Receipts feature provides visibility into the message status, l
| [MessageList](/ui-kit/ios/message-list) | [MessageList](/ui-kit/ios/message-list) is a Component that renders different types of Message bubbles, Read Recept status is an integral part of all message bubbles, no matter the type, and provides real-time updates about the status of the message. |
| [MessageInformation](/ui-kit/ios/message-information) | [MessageInformation](/ui-kit/ios/message-information) component provides transparency into the status of each sent message, giving the sender insights into whether their message has been delivered and read. |
+
+## Mark As Unread
+
+Mark as Unread feature allows users to manually mark messages as unread, helping them keep track of important conversations they want to revisit later. When enabled, the message list can automatically start from the first unread message, making it easier to pick up where you left off.
+
+
+
+
+
+| Components | Functionality |
+| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [Message List](/ui-kit/android/message-list) | [Message List](/ui-kit/android/message-list) provides the "Mark as unread" option in message actions and supports starting from the first unread message when enabled. |
+| [Conversations](/ui-kit/android/conversations) | [Conversations](/ui-kit/android/conversations) component listens to conversation updates and reflects the updated unread count in real-time. |
+
## Typing Indicator
The Typing Indicator feature in CometChat shows when a user is typing a response in real-time, fostering a more interactive and engaging chat environment. This feature enhances the real-time communication experience, making conversations feel more natural and fluid.
diff --git a/ui-kit/ios/events.mdx b/ui-kit/ios/events.mdx
index c159fa65..ccdfc705 100644
--- a/ui-kit/ios/events.mdx
+++ b/ui-kit/ios/events.mdx
@@ -669,7 +669,10 @@ extension ViewController: CometChatGroupEventListener {
CometChatConversationEvents emits events when the logged-in user executes some action on a conversation object
-It contains the following properties and methods
+It contains the following properties and methods:
+
+* `ccConversationDeleted`: Triggered when the logged-in user deletes a conversation.
+* `ccUpdateConversation`: Triggered when there is an update in the conversation.
### observer
@@ -734,22 +737,6 @@ removeListener(_ id: String)
***
-### onConversationDelete
-
-This method is used to perform some task when the logged-in user has deleted a conversation
-
-### Signature
-
-
-
-```swift
-onConversationDelete(conversation: Conversation)
-```
-
-
-
-
-
### Parameters
| Parameters | Type | Description |
@@ -766,7 +753,8 @@ Here we will go through how to emit events specific to the UI Kit which listens
```swift
//pass the conversation object you want to delete
-CometChatConversationEvents.emitConversationDelete(conversation: Conversation)
+CometChatConversationEvents.ccConversationDelete(conversation: Conversation)
+CometChatConversationEvents.ccUpdateConversation(conversation: Conversation)
```
@@ -782,13 +770,14 @@ Here we will go through how anyone can listen to these client-side Conversation
| Event | Description |
| ---------------------- | --------------------------------------------------------------------------- |
| `onConversationDelete` | This event will be triggered when the logged in user deletes a conversation |
+| `ccUpdateConversation` | This event will be triggered when the logged in user updates a conversation |
+
```swift
// View controller from your project where you want to listen events.
public class ViewController: UIViewController {
-
public override func viewDidLoad() {
super.viewDidLoad()
@@ -800,17 +789,18 @@ public class ViewController: UIViewController {
// Uncubscribing for the listener to listen events from conversation module
CometChatConversationEvents.removeListener("LISTENER_ID_USED_FOR_ADDING_THIS_LISTENER")
}
-
-
}
// Listener events from conversation module
-extension ViewController: CometChatConversationEventListener {
-
- func onConversationDelete(conversation: Conversation) {
- // Do Stuff
+extension ViewController: CometChatConversationEventListener {
+
+ func ccConversationDeleted(conversation: Conversation) {
+ // Do stuff
+ }
+
+ func ccUpdateConversation(conversation: Conversation) {
+ // Do stuff
}
-
}
```
diff --git a/ui-kit/ios/message-list.mdx b/ui-kit/ios/message-list.mdx
index 6c18ad7e..0deb40de 100644
--- a/ui-kit/ios/message-list.mdx
+++ b/ui-kit/ios/message-list.mdx
@@ -275,7 +275,10 @@ List of properties exposed by MessageListStyle
| **Error Image** | Icon image for error state. | `CometChatMessageList.style.errorImage = UIImage(named: "error-icon")` |
| **Empty Image** | Icon image for empty state. | `CometChatMessageList.style.emptyImage = UIImage(named: "empty-icon")` |
| **New Message Indicator Image** | Icon image for new message indicator. | `CometChatMessageList.style.newMessageIndicatorImage = UIImage?` |
-| **Background Image** | Background image for the component. | `CometChatMessageList.style.backgroundImage = UIImage?` |
+| **New Message Indicator Text Color** | Text color for unread messages indicator. | `CometChatMessageList.style.newMessageIndicatorTextColor = UIColor?` |
+| **New Message Indicator Text Font** | Text font for unread messages indicator. | `CometChatMessageList.style.newMessageIndicatorTextFont = UIFont?` |
+| **New Message Indicator Background Color** | Background color for unread messages indicator. | `CometChatMessageList.style.newMessageIndicatorBackgroundColor = UIColor?` |
+
***
@@ -324,6 +327,9 @@ Below is a list of customizations along with corresponding code snippets
| set(emptyChatGreetingView:) | Custom view displayed when the AI assistant chat is empty. | `emptyChatGreetingView = { /* custom view */ }` |
| set(streamingSpeed:) | Sets the speed of streaming for AI assistant messages. | `streamingSpeed = 50` |
| goToMessage(withId:) | Scrolls the message list to a specific message, making it visible to the user based on the provided message ID | `goToMessage(messageId: Int)` |
+| startFromUnreadMessages | Starts the message list from the first unread message.. | `startFromUnreadMessages = true` |
+| showMarkAsUnreadOption | Sets the visibility of the “Mark as unread” option in the message actions menu. | `showMarkAsUnreadOption = true` |
+
***
@@ -394,7 +400,7 @@ Each closure receives a timestamp (Int, representing UNIX time) and must return
***
-#### Set HeaderView
+#### SetHeaderView
You can set custom headerView to the Message List component using the following method.
@@ -544,7 +550,7 @@ class CustomHeaderViewCell: UICollectionViewCell {
***
-#### Set FooterView
+#### SetFooterView
You can set custom footerView to the Message List component using the following method.
@@ -696,7 +702,7 @@ class CustomFooterViewCell: UICollectionViewCell {
***
-#### Set DateSeparatorPattern
+#### SetDateSeparatorPattern
You can modify the date pattern of the message list date separator to your requirement using `setDateSeparatorPattern()`. This method accepts a function with a return type String. Inside the function, you can create your own pattern and return it as a String.
@@ -928,6 +934,27 @@ cometChatMessageList.set(emptyView: emptyLabel)
***
+#### SetNewMessageIndicatorView
+
+Set a custom view for the unread message indicator.
+
+
+
+```swift
+let newMessageIndicatorView = NewUnreadMessageIndicator()
+cometChatMessageList.set(newMessageIndicatorView:: newMessageIndicatorView)
+
+class NewUnreadMessageIndicator: UIView {
+ // Your custom view
+}
+```
+
+
+
+
+
+***
+
To ensure that the `MessageList` is properly configured, passing the controller is mandatory.