Search code examples
iosxcodequickblox

How to create session between two users in Quickblox?


I am currently working chat module in my application using Quickblox. I am able to login and retrieve users successfully, but when I want to connect with other user I am getting an error.

Here I found code on document

[[QBChat instance] connectWithUser:ReceiverUSer completion:^(NSError * error )
    {
        NSLog(@"%@",error);
    }];

and I am getting an error :

Error Domain=com.quickblox.chat Code=401 "Password not verified" UserInfo=0x7fe0e9dc7440 {NSLocalizedDescription=Password not verified} 2015-11-19 16:15:35.998 iosChat[20966:132723]

What should be my next step to implement chat?


Solution

  • This method is used to connect yourself to the chat and not your opponents. Furthermore, in order to connect with this method your QBUUser instance must have valid password set as password property.

    Basically you need to connect yourself to the chat and then just start creating dialogs and sending messages.