Reputation: 103
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
Upvotes: 8
Views: 4557
Reputation: 6045
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 :)
Upvotes: 10
Reputation: 11308
Have you installed the latest RestKit, i.e. 0.20pre2 version? If yes, than you're dealing with the same problems as I was 30 minutes ago. The thing is that API changed drastically from 0.10 to 0.20 versions, and the documentation is still describing things as of version 0.10. Regarding your particular problem, the RKClient class doesn't exist anymore in 0.20, and the whole approach to networking has changed.
Upvotes: 3