ios - Quickblox 聊天未进行身份验证

标签 ios quickblox

我在我的应用程序中使用 quickblox 进行一对一聊天。 用户已经登录。 但是当我尝试登录聊天时,出现以下错误。

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)

我做错了什么。

QBUUser *currentUser = [QBUUser user];
[QBChat instance].delegate = self;
[[QBChat instance] loginWithUser:currentUser];

最佳答案

这不是正确的方法,

currentUser实例为空,至少要设置IDpassword才能登录Chat

例如

QBUUser *user = [QBUUser user];
user.ID = 979387;
user.password = @"userpass";
[[QBChat instance] loginWithUser:user];

关于ios - Quickblox 聊天未进行身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22755804/

相关文章:

ios - 如何添加几个 UICollectionReusableView

ios - Xcode 6 中的打印机模拟器在哪里

android - Quickblox Android 推送通知

android - 图像未附加在 quickblox for android 中

ios - 使用 cocoa pod 将 Quickblox 连接到应用程序

android - 适用于 Android/iOS/WinPhone 的 Xamarin 共性层

ios - Swift 3 需要有关 Realm 查询的帮助

ios - 用户点击 "don' t 允许后显示 UILocalNotification 请求”

android - 无法使用 Ant 从外部 jar 构建多个 Android dex 文件

android - 在项目 libs 文件夹中添加 Quickblox-android-0.8.1.jar 文件后,在设备上安装时出现错误