在quickblox中注册新用户时应用程序崩溃

时间:2014-12-22 08:54:11

标签: ios quickblox

我正在开发一个聊天应用程序,我已经添加了Quickblox框架用于聊天,但是当我尝试使用新用户应用程序注册时崩溃并出现以下错误:

2014-12-22 14:14:59.369 closeChat[14705:2255670] 
  +[QBRequest createSessionWithSuccessBlock:errorBlock:]: 
  unrecognized selector sent to class 0x223774
2014-12-22 14:14:59.373 closeChat[14705:2255670] *** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: 
'+[QBRequest createSessionWithSuccessBlock:errorBlock:]: unrecognized selector sent to class 0x223774'
*** First throw call stack:
(0x29e5949f 0x3764fc8b 0x29e5e7d5 0x29e5c7d7 0x29d8e058 
 0xbfbd5 0x2d34c9fb 0x2d34c9a1 0x2d337613 0x2d34c40d 
 0x2d3111ad 0x2d3460c1 0x2d34599d 0x2d31c15d 0x2d58fab9 
 0x2d31abb9 0x29e1fd57 0x29e1f167 0x29e1d7cd 0x29d6b3c1 
 0x29d6b1d3 0x311690a9 0x2d37afa1 0xd463d 0x37bcfaaf)
libc++abi.dylib: terminating with uncaught exception of type NSException

我使用了以下代码......

[QBRequest createSessionWithSuccessBlock:^(QBResponse *response, QBASession *session)
    {
    // session created

    QBUUser *user = [QBUUser user];
    user.password = @"rakesht@idevtchnolabs.com";
    //user.userEmail = @"";
    user.email = @"swami";
    [QBRequest signUp:user successBlock:^(QBResponse *response, QBUUser *user)
    {
        [QBRequest createSessionWithSuccessBlock:^(QBResponse *response, QBASession *session)
        {
            NSLog(@"checkingl registering");
            [QBRequest userWithLogin:@"" successBlock:^(QBResponse *response, QBUUser *user)
            {
                NSLog(@"checkingl updatingqb");
                //[self loginQBwithUser:userName];
            } errorBlock:^(QBResponse *response)
             {
                // Handle error
            }];

        }errorBlock:^(QBResponse *response)
        {
            // Handle error
        }];

        NSLog(@"QBSignup Success");
    } errorBlock:^(QBResponse *response)
    {
        NSLog(@"error while signing up with QB %@",response);
    }];
}
errorBlock:^(QBResponse *response)
{
    NSLog(@"%@", response.error);
}];

1 个答案:

答案 0 :(得分:1)

尝试将 / usr / include / libxml2 添加到Xcode 标题搜索路径 -lxml2,-ObjC 标记到其他项目设置中的Linker Flags 部分。