Search code examples
iosxcoderestkit

Use of undeclared identifier 'RKClient' after install RestKit


After I installed RestKit according to instructions (get source with github) and after importing , I get a "Use of undeclared identifier 'RKClient'" Error in XCode.

According the instructions, after installation and linking, I've put following code in didFinishedLaunchingWithOptions:

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

Any ideas? Thanks


Solution

  • RKClient is no part of RestKit 0.20.x anymore. RestKit now use AFNetworking under the hood. You can access the new HTTP Client like that:

    [RKObjectManager sharedManager].HTTPClient
    

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

    You'll find most of the changes about the upgrade :)