RK请求强制基本身份验证无法识别的选择器(未找到属性)

时间:2012-10-02 12:59:11

标签: iphone objective-c ios xcode restkit

我刚刚将restkit升级到0.10.2。我在这段代码中遇到错误:

NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/browse/authentication/#", address]];

RKRequest *request = [RKRequest requestWithURL:url delegate:self];
request.forceBasicAuthentication = YES;
request.username = [loginField text];
request.password = [passwordField text];
[request send];

错误:

[RKRequest setForceBasicAuthentication:]: unrecognized selector sent to instance 0x348420
 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RKRequest setForceBasicAuthentication:]: unrecognized selector sent to instance 0x348420'

升级restkit后我没有更改任何代码。 谢谢!

编辑:标题

1 个答案:

答案 0 :(得分:0)

执行Product->Hold down option button->"Clean Build Folder"解决了代码完成错误:)