1

I want to develop web service app which will be used by mobile app (iPhone and Android). I was investigating a bit, and I found only examples that uses SOAP for communicating. SOAP isn't supported in Rails3, and some libraries like actionwebservice doesn't work in Rails3. On other side, developers says that SOAP is the past, and RESTful is the future. I don't know anymore what to do and what to learn, and I need advice.

What protocols and technologies you suggest me to use? I need something that can handle connection between iPhone app and Rails web app (web service).

1 Answer 1

1

I'm biased towards XML.

It's easy for Rails to generate its data, output in XML format, and it's very easy to get and parse XML from the iPhone. This is all done form the NSXMLParser class.

Using the one call:

- (id)initWithContentsOfURL:(NSURL *)url

You can retrieve data from your Rails app in XML format, and read it into an object, then use other member functions of NSXMLParser to parse the received data.

Sign up to request clarification or add additional context in comments.

1 Comment

though you should keep in mind that - (id)initWithContentsOfURL:(NSURL *)url is synchronous and should not be called on the main thread (or you'll freeze the UI)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.