ios - Swift, QuickBlox Error Domain=com.quickblox.chat Code=-1004 "(null)" -
i trying join group on quickblox , after compiling join group code. it's showing me error.
(error domain=com.quickblox.chat code=-1004 "(null)" userinfo={nslocalizedrecoverysuggestion=you have connected chat in order use chat api.})
my code :-
let groupchatdialog: qbchatdialog = qbchatdialog(dialogid: "57442b84a28f9a759100000e", type: qbchatdialogtype.group) self.groupchatdialog.joinwithcompletionblock { (error: nserror?) -> void in print(error)
anybody knows problem here.
himanshu,
error description says have login chat session before joining group dialog.
in case if not aware, quickblox makes use of 2 sessions
- user session :
session establish server using
[qbrequest loginwithuserlogin:"quickblox_user_name" password: "quickblox_password" successblock:^(qbresponse *response, qbuuser *user) { } errorblock:^(qbresponse *response) { }];
this authenticate user valid quickblox user.
docs says in order recieve seamless messages/chats have log in chat session.
- chat session:
session allow send , recieve realtime chats , allow join group dialogs.
[[qbchat instance] connectwithuser:user completion:^(nserror * _nullable error) { }];
try joining dialog once completion block of connectwithuser triggered. dialog join no issue.
Comments
Post a Comment