I am in the process of creating an iPhone app that requires to interact with a .Net web service. I did some research this but a lot discussions on this website were outdated. So I thought it would be best to ask the question again and see if anyone of you can help me with this.
From the what I have read on other discussions, I can either use NSURLConnection or NSXMLParser to send and receive data. People have suggested I can use JSON as well. I am just starting to learn about web service. I’m just testing out some basic web methods on a web service that return a string. Nothing complex. What’s the best way to achieve this functionality?
Thank you!
Update –
Sorry I should’ve done some more research before posting the question. Now since I understood how to consume a web service on .net, I feel the question I asked was stupid and totally understand the down votes. Sorry!
I think you should go with the JSON format. It’s faster to parse and lighter to download.
Besides , there is no difference in the difficulty on the implementation. For parsing the data on the client size (your app) , I suggest the JSONKit library – it’s the fastest around as far as I know. There are several speed tests available on the web. Like this one.
NSURLConnection is very useful too. You can get response codes , fetch data , etc. JSON is obviously useful after you get that data.
Cheers!