从iPhone访问Web服务 [英] Accessing Web Service from iPhone

查看:149
本文介绍了从iPhone访问Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关从iPhone拨打网络服务的问题?


  1. 任何人都有任何有关这方面的建议教程?

  2. 任何人都有通过这些电话实施安全性的最佳做法。

  3. 有没有人为了轻松的iPhone服务通话而创建或查看任何共享库或封装容器?


解决方案

这在大多数移动设备上要简单得多, / p>

最佳实践 - 使用操作(NSOperation)来处理请求 - 这是我发现减少网络调用的线程复杂性,



您可以考虑使用JSON进行调用 - 此库非常有用: https://github.com/stig/json-framework/



但是你应该很容易使用正常的iPhone命令来发出网络请求。



教程:SeismicXML或去看看斯坦福讲座CS193P - 演讲9应该是你的一杯茶!



http://www.stanford.edu/class/cs193p/cgi-bin/index.php


Questions on calling web services from iPhone?

  1. Anyone have any recommended tutorials on doing this?
  2. Anyone have any best practices on implementing security with these calls?
  3. Has anyone made or seen any shared libraries or wrappers for easy web service calls from the iPhone?

解决方案

This is much simpler to do than on most mobile devices - and more robust (in my opinion).

Best practices - use operations (NSOperation) to handle the requests - this is the best way I have found to reduce the complexities of threading with web calls and take everything off the main thread.

For security make HTTPS calls.

You might want to consider using JSON for the call - then this library is useful : https://github.com/stig/json-framework/

However you should find it very easy to make web requests with the normal iPhone commands.

Ah yes a tutorial: SeismicXML or go and check out the Stanford lectures for CS193P - lecture 9 should be your cup of tea!

http://www.stanford.edu/class/cs193p/cgi-bin/index.php

这篇关于从iPhone访问Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆