Sam Sam - 5 months ago 10
Swift Question

Update Chat Dynamically in Quickblox

I've searched in quickblox docs but couldn't find any delegate methods for retrieving chat messages dynamically. I have a view controller with table view where the cell contains dynamic chat messages. It needs to be updated in real time.

Answer

Take a look at our chat sample. In our class ChatViewController.m you can find methods for handling incoming messages - QMChatServiceDelegate. Or you can use methods of QBChatDelegate

- (void)chatRoomDidReceiveMessage:(QBChatMessage *)message fromDialogID:(NSString *)dialogID
{
}

- (void)chatDidReceiveMessage:(QBChatMessage *)message
{

}

- (void)chatDidReceiveSystemMessage:(QBChatMessage *)message
{

}