我正在尝试登录 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/