Question

I am using quickblox in my app to do 1 to 1 chat. The user is already login. But when I try to login the chat, I get the following error.

2014-03-31 12:42:09.532 MyChat[2175:3803] QBChat/didNotAuthenticate, error: <failure      xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized/></failure>
2014-03-31 12:42:09.533 MyChat[2175:3803] -[QBContactList dealloc] -> 
2014-03-31 12:42:09.533 MyChat[2175:3803] QBChat/didDisconnect, error: (null)

What am I doing wrong.

QBUUser *currentUser = [QBUUser user];
[QBChat instance].delegate = self;
[[QBChat instance] loginWithUser:currentUser];
Was it helpful?

Solution

It's not a right way,

currentUser instance is empty, you should set ID and password at least to login to Chat

For example

QBUUser *user = [QBUUser user];
user.ID = 979387;
user.password = @"userpass";
[[QBChat instance] loginWithUser:user];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top