Quckiblox ios SDK在所有API调用中崩溃

时间:2015-10-04 03:48:58

标签: ios quickblox

我正在使用Quckiblox(Swift 2,iOS 9)开发应用程序,所有进行API调用的尝试都会产生以下错误:

  

2015-10-04 04:46:06.411 Twister [1964:846268] + [QBRequest signUp:successBlock:errorBlock:]:无法识别的选择器发送到类0x1000f7358   2015-10-04 04:46:06.415 Twister [1964:846268] ***由于未捕获的异常'NSInvalidArgumentException'终止应用程序,原因:'+ [QBRequest signUp:successBlock:errorBlock:]:无法识别的选择器发送到类0x1000f7358'

SDK与Cocoapods一起安装,它的设置如下:

func setup() {
    print("Setting up Quickblox...")
    QBApplication.sharedApplication().applicationId = UInt(AppConfiguration.Quickblox.ApplicationID.description)!
    QBConnection.registerServiceKey(AppConfiguration.Quickblox.AuthorizationKey.description)
    QBConnection.registerServiceSecret(AppConfiguration.Quickblox.AuthorizationSecret.description)
    QBSettings.setAccountKey(AppConfiguration.Quickblox.AccountKey.description)
}

这是错误的电话:

QBRequest.signUp(user, successBlock: { response, user -> Void in
        print("Sign up successfull:\n \(user)")
        })
        { response -> Void in
        print(response.error)
    }

关于可能出错的任何想法?

2 个答案:

答案 0 :(得分:2)

  1. Make sure you have opened xcworkspace and NOT xcodeproj.
  2. I have tested your code and everything works, so problem is that Xcode can not find .framework symbols, it finds only headers

答案 1 :(得分:0)

可能这已经晚了,但将来可能对某人有所帮助  我遇到了同样的问题,这已经解决了

  

在项目设置中将-lxml2,-ObjC标志添加到其他链接器标志部分

Official doc link

如果仍然发生错误,请检查是否缺少任何框架