我正在尝试登录QuickBlox Chat(QBChat
),但无法登录iOS9(通过XCode7测试版运行)。它在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。所以我按照自己的意愿设置了一切。
注意,我可以创建会话但无法登录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!");
}
请确保 - 我已根据需要为userName或ID或密码添加了正确的值。
答案 0 :(得分:1)
请再试一次,此问题已修复。它适用于iOS 9 beta 4 +