Using undeclared identifier "RKClient" after installing RestKit

After I installed RestKit according to the instructions (get the source from github) and after importing, I get a "Using undeclared identifier" RKClient "" Error in Xcode.

Following the instructions, after installation and linking, I added the following code to doneFinishedLaunchingWithOptions:

RKClient *client = [RKClient clientWithBaseURLString:@"http://restkit.org"]; 

Any ideas? Thanks

+8
ios xcode restkit
source share
2 answers

RKClient is no longer part of RestKit 0.20.x. RestKit now uses AFNetworking under the hood. You can access the new HTTP client as follows:

 [RKObjectManager sharedManager].HTTPClient 

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

You will find most of the changes about the upgrade :)

+10
source share

Have you installed the latest version of RestKit, i.e. version 0.20pre2? If so, how do you deal with the same problems as 30 minutes ago. The fact is that the API has changed a lot from 0.10 to 0.20 versions, and the documentation still describes things from version 0.10. As for your specific problem, the RKClient class no longer exists at 0.20, and the whole approach to the network has changed.

+3
source share

All Articles