gpt4 book ai didi

ios - 无法为 QuickBlox iOS 2.0+ 调用 NewAPI

转载 作者:行者123 更新时间:2023-11-29 10:36:17 26 4
gpt4 key购买 nike

我正在使用 Quickblox SDK 并开发基于 iOS 的应用程序。

目前,我无法使用新的 API( block 语句)。
我必须使用已弃用的委托(delegate)方式。

这发生在我尝试使用 NewAPI 格式调用创建 session 时

[QBRequest createSessionWithSuccessBlock:^(QBResponse *response, QBASession *session) {
NSLog(@"Successfull response!");
} errorBlock:^(QBResponse *response) {
NSLog(@"Response error: %@", response.error);
}];

它回来了

+[QBRequest createSessionWithSuccessBlock:errorBlock:]: 
unrecognized selector sent to class 0x2a5798
*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '+[QBRequest createSessionWithSuccessBlock:errorBlock:]:
unrecognized selector sent to class 0x2a5798'

但我可以使用已弃用的方式调用

[QBAuth createSessionWithDelegate:self context:testContext];

我已经处理过

-(void)completedWithResult:(Result *)result context:(void *)contextInfo { }

我很确定我关注了iOS SDK Integration
SDK版本为2.0.10

我应该修复什么错误才能使用新的 API?

最佳答案

我在我的 Swift 项目中遇到了完全相同的问题。在我的例子中,我通过在我的build设置中将 -ObjC 添加到 Other Linker Flags 来修复它。

关于ios - 无法为 QuickBlox iOS 2.0+ 调用 NewAPI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26883220/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com