In case of logout this method will be called
- (void)chatDidFailWithError:(int)code;
where code will be 0
Question
I would like to have my QBchat automatically be logged back in if it is disconnected. When I attempt to send a message and I am logged out, is their a callback function that I can implement to test if I am logged out? Also, if I am correct we must have a session establish with QB, than we log into our QBUUSER, than we must log into our QBChat to send messages? How can reconnect all of these pieces if I lose connection.
Solution
In case of logout this method will be called
- (void)chatDidFailWithError:(int)code;
where code will be 0
OTHER TIPS
ChatDidFailWithError is a QBChat delegate method and checks for an active chat instance. If the chat has indeed failed auto-login with the user credentials saved in the DataManager singleton. (Example of which is in the QuickBlox framework's documentation)