What is the best resource for learning how to handle service calls in the iPhone SDK?
I'm starting out with iPhone development and am struggling to find tutorials on handling service calls 开发者_StackOverflow中文版whether via SOAP or REST etc. As I understand it the SDK can't handle SOAP so is it best to look into REST?
You can parse XML on the iPhone, therefore nothing stops you from using SOAP services from your iPhone apps. REST services are easier to consume, though, at least in my experience. It's just a matter of using an HTTP networking library and then parsing JSON or XML responses. I personally used ASIHTTPRequest and the json-framework in many apps, with good results.
- http://allseeing-i.com/ASIHTTPRequest/
- http://code.google.com/p/json-framework/
Check out other similar questions in StackOverflow for more details. There's been a lot of questions about this.
精彩评论