Search code examples
iosswiftchatquickblox

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.


Solution

  • 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
    {
    
    }