QuickBlox - 无法连接聊天

时间:2016-02-12 16:13:08

标签: ios quickblox

当我的应用程序启动时,我正在使用QMServicesManager:

- (void)logInWithUser:(QBUUser *)user

这应该负责身份验证并登录聊天服务。 对聊天服务的登录API调用返回时没有错误,但是一旦我尝试发送消息,我仍然收到错误:

“您没有与聊天相关联。”

致电[QBChat instance]).isConnected返回false

此时,如果我尝试通过调用QMChatService来解决此问题:

- (void)connectWithCompletionBlock:(QBChatCompletionBlock)completion

我收到错误:"Attempting to connect while already connected or connecting."

更新 使用QuickBlox的扩展日志,我可以看到它的开始位置。登录到聊天服务实际上失败,而不返回返回块中的任何错误。 这是日志:

23:07:12.982 [ChatService] Connecting to Chat, host: chat.quickblox.com, user JID: ...
23:07:42.983 [ChatService] Did disconnect 

看起来很快...... 关于那个的任何见解?

1 个答案:

答案 0 :(得分:1)

Try setting [QBSettings setLogLevel: QBLogLevelDebug]; when application starts in the AppDelegate.

This would enable you to see the QuickBlox Log in your Xcode console which will give a better message about what's happening.