NIMChatManagerDelegate Protocol Reference
| Conforms to | NSObject | 
|---|---|
| Declared in | NIMChatManagerProtocol.h | 
– willSendMessage:
	Callback for sending messages
- (void)willSendMessage:(NIMMessage *)messageParameters
| message | message to be sent | 
|---|
Discussion
Callback for sending messages
Because there a preparation process before sending a message, the message is added to Datasource when this callback is triggered
Declared In
NIMChatManagerProtocol.h
– uploadAttachmentSuccess:forMessage:
	Callback for successful uploading a resource file
- (void)uploadAttachmentSuccess:(NSString *)urlString forMessage:(NIMMessage *)messageParameters
| urlString | URL for the resource of the message | 
|---|---|
| message | message to be sent | 
Discussion
Callback for successful uploading a resource file
For messages that need to upload resources (image, video, and audio), the SDK will send a notification through this interface after resources are uploaded, and the upper layer can reconfigure the push information after receiving the notification (APNs payload)
Declared In
NIMChatManagerProtocol.h
– sendMessage:progress:
	Callback for progress of sending messages
- (void)sendMessage:(NIMMessage *)message progress:(float)progressParameters
| message | message to be sent | 
|---|---|
| progress | the progress | 
Discussion
Callback for progress of sending messages
Declared In
NIMChatManagerProtocol.h
– sendMessage:didCompleteWithError:
	Completion callback for sending messages
- (void)sendMessage:(NIMMessage *)message didCompleteWithError:(nullable NSError *)errorParameters
| message | message to be sent | 
|---|---|
| error | failure reason. If the operation succeeds, the error parameter returns nil | 
Discussion
Completion callback for sending messages
Declared In
NIMChatManagerProtocol.h
– onRecvMessages:
	Get notified when the message is received
- (void)onRecvMessages:(NSArray<NIMMessage*> *)messagesParameters
| messages | The message list, internal is NIMMessage | 
|---|
Discussion
Get notified when the message is received
Declared In
NIMChatManagerProtocol.h
– onRecvMessageReceipts:
	Get notified when receipt message is received
- (void)onRecvMessageReceipts:(NSArray<NIMMessageReceipt*> *)receiptsParameters
| receipts | receipt array | 
|---|
Discussion
Get notified when receipt message is received
If the upper layer receives this message, all storage and model layer services have been updated, and only the UI needs to be updated.
Declared In
NIMChatManagerProtocol.h
– onRecvRevokeMessageNotification:
	Get notified when a message is recalled
- (void)onRecvRevokeMessageNotification:(NIMRevokeMessageNotification *)notificationParameters
| notification | notification for recalled message @discusssion CommsEase first search the message from the local database and delete it after the message is recalled, and then notify the upper layer that the message has been deleted. | 
|---|
Discussion
Get notified when a message is recalled
Declared In
NIMChatManagerProtocol.h
– fetchMessageAttachment:progress:
	Get notified when a message attachment is received
- (void)fetchMessageAttachment:(NIMMessage *)message progress:(float)progressParameters
| message | received message | 
|---|---|
| progress | the progress | 
Discussion
Get notified when a message attachment is received
attachments include images, video thumbnails, and audio files
Declared In
NIMChatManagerProtocol.h
– fetchMessageAttachment:didCompleteWithError:
	Get notified when a message attachment is received
- (void)fetchMessageAttachment:(NIMMessage *)message didCompleteWithError:(nullable NSError *)errorParameters
| message | received message | 
|---|---|
| error | error response. If the operation succeeds, nil is returned, | 
Discussion
Get notified when a message attachment is received
Declared In
NIMChatManagerProtocol.h