Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use of undeclared identifier 'RKClient' after install RestKit

Tags:

xcode

ios

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.

  • https://github.com/RestKit/RestKit/wiki/Installing-RestKit-in-Xcode-4.x
  • https://github.com/RestKit/RestKit/wiki/Installing-RestKit-v0.20.x-as-a-Git-Submodule

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

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

Any ideas? Thanks

like image 276
neno Avatar asked Dec 06 '12 14:12

neno


1 Answers

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 :)

like image 148
allaire Avatar answered Oct 04 '22 20:10

allaire