Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating Objective-c client side code for consuming Rest Services

I am working on building an iPhone application that uses an external server to store most of the data. The server exposes all the required services using a REST API.

Ideally I would like to generate the client side code in objective-c that can consume these services. Preferably these should return objects that I can easily use instead of having to parse the return XML.

What options am I looking at ? I have researched quiet a bit on this and the closest to code generation I have seen is wsdl2objc . Since I also own the backend services I could make them SOAP based services, but I really prefer not to do that since I will later on use the same set of services to build a Web UI ( for eg). Other option I have is to go with RestKit.

Any guidance on this is much appreciated. I am pretty sure this is a use case lots of people have faced and I just am not able to find the right resources or am not looking at the right places.

Cheers !!!

like image 724
Vidyanand Avatar asked Apr 07 '11 17:04

Vidyanand


1 Answers

RestKit is a great framework. You're still going to have to write code, but it will make the process of moving data between Cocoa models and RESTful/JSON web services elegantly straightforward. I recommend running through the examples to get your head around their way of doing things.

like image 98
jmans Avatar answered Nov 11 '22 16:11

jmans