Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Quick blox chat not authenticating

Tags:

ios

quickblox

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];
like image 449
Abin George Avatar asked Dec 14 '25 01:12

Abin George


1 Answers

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];
like image 141
Rubycon Avatar answered Dec 16 '25 18:12

Rubycon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!