ios - QuickBlox : Error while trying to login into QBChat in iOS 9

标签 ios quickblox xmppframework

我正在尝试登录 QuickBlox Chat (QBChat),但无法登录 iOS9(通过 XCode7 beta 运行)。它在 iOS 7 和 8 中运行良好。错误在调试控制台中记录以下内容:

2015-07-06 17:56:47.464 MyApp[25156:251907] xmppStreamDidConnect
2015-07-06 17:56:47.464 MyApp[25156:251907] -[QBChat xmppStreamDidConnect:] -> Trying TLS...
2015-07-06 17:56:47.910 MyApp[25156:251916] -[QBChat xmppStreamDidDisconnect:withError:] -> error: 
Error Domain=kCFStreamErrorDomainSSL Code=-9850 "The operation couldn’t be completed.
(kCFStreamErrorDomainSSL error -9850.)" UserInfo=0x7f9dd962e430 
{NSLocalizedRecoverySuggestion=Error code definition can be found in Apple's 
SecureTransport.h}

今天,我已将我的 QuickBlox iOS SDK 从 2.2 更新到 2.3。所以我已经按照他们的要求设置了一切。

请注意,我可以创建 session 但无法登录到 QBChat

这是我的示例代码:

QBSessionParameters *parameters = [QBSessionParameters new];
parameters.userLogin = ...;
parameters.userPassword = ...;

[QBRequest createSessionWithExtendedParameters:parameters successBlock:^(QBResponse *response, QBASession *session) {
    DLog(@"Success");

    QBUUser *user = [QBUUser user];        
    user.ID = ...;
    user.password = ...;

    [[QBChat instance] addDelegate:self];

    [[QBChat instance] setAutoReconnectEnabled:YES];

    BOOL requestQBChatLogin = [[QBChat instance] loginWithUser:user];
    if(!requestQBChatLogin) {
        //This will never prints in logs
        DLog(@"Something went wrong while sending request for QBChatLogin.");
    }

} errorBlock:^(QBResponse *response) {
    DLog(@"Error: %@", response.error);
}];

-(void) chatDidLogin{
    //This will never call
    DLog(@"You have successfully signed in to QuickBlox Chat!");
}

- (void) chatDidNotLogin {
    //This will never call
    DLog(@"You have not signed in to QuickBlox Chat!");
}

请确保 – 我已根据需要为用户名或 ID 或密码添加了正确的值。

最佳答案

请重试,此问题已修复。它适用于 iOS 9 beta 4+

关于ios - QuickBlox : Error while trying to login into QBChat in iOS 9,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31246202/

相关文章:

ios - XMPPFramework- 文件传输中的错误 "405"<not-allowed>

javascript - Quickblox Javascript SDK + Angular + webRTC - 无法读取未定义的属性 'send'

ios - 将附件发送到 QuickBlox IOS sdk

ios - 无法使用 quickblox (iOS) 登录 facebook

c#-4.0 - 在 Microsoft 堆栈上使用 Comet/XMPP 与 WebSocket 技术的实时 Web 通知和更新选项?

ios - iOS XMPPFramework:如何解析didReceiveIQ?

iphone - 如何实现 JSON 解析代码以获取对 NSArray 的响应?

ios - 一个类似于 UIImagePickerController 的 Picker Controller 来选择文件 ios 7

ios - UICollectionViewCell 中的 UIButton 文本被覆盖。我究竟做错了什么?

objective-c - 导航 Controller 标题