安装RestKit后使用未声明的标识符"RKClient"

nen*_*eno 8 xcode ios restkit

我按照说明安装RestKit(使用github获取源代码),导入后,我在XCode中得到"使用未声明的标识符'RKClient'"错误.

根据说明,在安装和链接之后,我将以下代码放在didFinishedLaunchingWithOptions中:

RKClient *client = [RKClient clientWithBaseURLString:@"http://restkit.org"];
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?谢谢

all*_*ire 10

RKClient不再是RestKit 0.20.x的一部分.RestKit现在使用AFNetworking.您可以像这样访问新的HTTP客户端:

[RKObjectManager sharedManager].HTTPClient
Run Code Online (Sandbox Code Playgroud)

请参阅https://github.com/RestKit/RestKit/wiki/Upgrading-from-v0.10.x-to-v0.20.0

你会发现有关升级的大部分变化:)