#import <IEMChatManager.h>
Load all conversations from DB, will update conversation list in memory after this method is called
Synchronization method will block the current thread
- Returns
- Conversation list<EMConversation>
- (void) addDelegate: |
|
(3_1_0) |
|
|
|
(3_2_2) |
|
|
|
("Use -") |
EM_DEPRECATED_IOS[IEMChatManager addDelegate:delegateQueue:] |
|
|
| |
|
required |
Add delegate
- Parameters
-
aDelegate | Delegate |
aQueue | The queue of call delegate method |
- (void) asyncDownloadMessageAttachments: |
|
(EMMessage *) |
aMessage |
progress: |
|
(void(^)(int progress)) |
aProgressCompletion |
completion: |
|
("Use -downloadMessageAttachment:progress:completion") |
__deprecated_msg |
|
|
| |
|
required |
Download message attachment(voice, video, image or file), SDK can download voice automatically, so user should NOT download voice manually except automatic download failed
Asynchronous methods
- Parameters
-
aMessage | Message instance |
aProgressCompletion | The callback block of attachment download progress |
aCompletion | The callback block of download complete |
Download message thumbnail attachments (thumbnails of image message or first frame of video image), SDK can download thumbail automatically, so user should NOT download thumbail manually except automatic download failed
Asynchronous methods
- Parameters
-
aMessage | Message instance |
aProgressCompletion | The callback block of attachment download progress |
aCompletion | The callback block of download complete |
Resend Message
Asynchronous methods
- Parameters
-
aMessage | Message instance |
aProgressCompletion | The callback block of attachment upload progress |
aCompletion | The callback block of send complete |
Send a message
Asynchronous methods
- Parameters
-
aMessage | Message instance |
aProgressCompletion | The block of attachment upload progress |
aCompletion | The block of send complete |
Send read ack for message
Asynchronous methods
- Parameters
-
Delete a conversation
- Parameters
-
aConversationId | Conversation id |
aDeleteMessage | Whether delete messages |
- Returns
- Whether deleted successfully
- (void) deleteConversation: |
|
(NSString *) |
aConversationId |
isDeleteMessages: |
|
(BOOL) |
aIsDeleteMessages |
completion: |
|
(void(^)(NSString *aConversationId, EMError *aError)) |
aCompletionBlock |
|
|
| |
|
required |
Delete a conversation
- Parameters
-
aConversationId | Conversation id |
isDeleteMessages | Whether delete messages |
aCompletionBlock | The callback block of completion |
Delete multiple conversations
- Parameters
-
aConversations | Conversation list<EMConversation> |
aDeleteMessage | Whether delete messages |
- Returns
- Whether deleted successfully
- (void) deleteConversations: |
|
(NSArray *) |
aConversations |
isDeleteMessages: |
|
(BOOL) |
aIsDeleteMessages |
completion: |
|
(void(^)(EMError *aError)) |
aCompletionBlock |
|
|
| |
|
required |
Delete multiple conversations
- Parameters
-
aConversations | Conversation list<EMConversation> |
aIsDeleteMessages | Whether delete messages |
aCompletionBlock | The callback block of completion |
- (void) downloadMessageAttachment: |
|
(EMMessage *) |
aMessage |
progress: |
|
(void(^)(int progress)) |
aProgressBlock |
completion: |
|
(void(^)(EMMessage *message, EMError *error)) |
aCompletionBlock |
|
|
| |
|
required |
Download message attachment(voice, video, image or file), SDK downloads attachment automatically, no need to download attachment manually unless automatic download failed
- Parameters
-
aMessage | Message instance |
aProgressBlock | The callback block of attachment download progress |
aCompletion | The callback block of download complete |
- (void) downloadMessageThumbnail: |
|
(EMMessage *) |
aMessage |
progress: |
|
(void(^)(int progress)) |
aProgressBlock |
completion: |
|
(void(^)(EMMessage *message, EMError *error)) |
aCompletionBlock |
|
|
| |
|
required |
Download message thumbnail (thumbnail of image message or first frame of video image), SDK downloads thumbails automatically, no need to download thumbail manually unless automatic download failed.
- Parameters
-
aMessage | Message instance |
aProgressBlock | The callback block of attachment download progress |
aCompletion | The callback block of download complete |
- (NSArray *) getAllConversations |
|
|
|
|
required |
Get all conversations, by loading conversations from DB if not exist in memory
- Returns
- Conversation list<EMConversation>
- (EMConversation *) getConversation: |
|
(NSString *) |
aConversationId |
type: |
|
(EMConversationType) |
aType |
createIfNotExist: |
|
(BOOL) |
aIfCreate |
|
|
| |
|
required |
Get a conversation
- Parameters
-
aConversationId | Conversation id |
aType | Conversation type |
aIfCreate | Whether create conversation if not exist |
- Returns
- Conversation
- (NSString *) getMessageAttachmentPath: |
|
(NSString *) |
aConversationId |
|
|
required |
Get message attachment local path for the conversation. Delete the conversation will also delete the files under the file path.
- Parameters
-
aConversationId | Conversation id |
- Returns
- Attachment path
Import multiple conversations to DB
- Parameters
-
aConversations | Conversation list<EMConversation> |
- Returns
- Whether imported successfully
Import multiple conversations to DB
- Parameters
-
aConversations | Conversation list<EMConversation> |
aCompletionBlock | The callback block of completion |
Import multiple messages
- Parameters
-
aMessages | Message list<EMMessage> |
- Returns
- Whether imported successfully
Import multiple messages
- Parameters
-
aMessages | Message list<EMMessage> |
aCompletionBlock | The callback block of completion |
Remove delegate
- Parameters
-
- (void) resendMessage: |
|
(EMMessage *) |
aMessage |
progress: |
|
(void(^)(int progress)) |
aProgressBlock |
completion: |
|
(void(^)(EMMessage *message, EMError *error)) |
aCompletionBlock |
|
|
| |
|
required |
Resend Message
- Parameters
-
aMessage | Message instance |
aProgressBlock | The callback block of attachment upload progress |
aCompletion | The callback block of send complete |
- (void) sendMessage: |
|
(EMMessage *) |
aMessage |
progress: |
|
(void(^)(int progress)) |
aProgressBlock |
completion: |
|
(void(^)(EMMessage *message, EMError *error)) |
aCompletionBlock |
|
|
| |
|
required |
Send a message
- Parameters
-
aMessage | Message instance |
aProgressBlock | The block of attachment upload progress |
aCompletion | The block of send complete |
- (void) sendMessageReadAck: |
|
(EMMessage *) |
aMessage |
completion: |
|
(void(^)(EMMessage *aMessage, EMError *aError)) |
aCompletionBlock |
|
|
| |
|
required |
Send read acknowledgement for message
- Parameters
-
aMessage | Message instance |
aCompletionBlock | The callback block of completion |
Update message to DB
- Parameters
-
- Returns
- Whether updated successfully
Update message
- Parameters
-
aMessage | Message |
aSuccessBlock | The callback block of completion |
The documentation for this protocol was generated from the following file: