iOS网路库建议 [英] iOS Networking Library Suggestion

查看:60
本文介绍了iOS网路库建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于为我的应用选择iOS网络库,我会提出一些建议。

I would some suggestion about the choose of an iOS networking library for my app.

我的需求是:


  1. 发送异步请求(GET和POST),如果网络中断,则显示 UIAlertView 来通知用户错误。

  • 发送简单同步请求(GET),如果网络中断,请执行上述操作。

    1. Send asynchronous request (GET and POST) and if the network is down display a UIAlertView to inform the user of the error.
    2. Send simple synchronous request (GET) and if the network is down do the same of the above point.

    有人可以提出建议吗? (除了不再支持的ASIHTTPRequest),如果此lib有一些不错的文档,则更好。我是iOS初学者。

    Does anyone have some lib to suggest? (except ASIHTTPRequest that is no longer supported) Possibly, if this lib have some nice doc is better. I'm an iOS beginner.

    感谢您的提前帮助。

    推荐答案

    我听说过RestKit的好东西 https://github.com/RestKit/RestKit

    I've heard good things about RestKit https://github.com/RestKit/RestKit

    此博客文章底部有许多替代方法。 http://allseeing-i.com/ [request_release];

    There is a good list of alternatives at the bottom of this blog post. http://allseeing-i.com/[request_release];

    我以前只使用过ASIHTTPRequest,即使Ben Copsey不再开发它了,看起来他仍在合并请求和其他内容。它被许多人使用,如果社区接手,我不会感到惊讶。对于至少另一个版本的iOS,它可能是安全的。

    I've only used ASIHTTPRequest before, and even though it's not longer being developed by Ben Copsey, it looks like he's still merging pull requests and stuff. It's in use by so many people, I wouldn't be surprised if the community picks it up. It will probably be safe for at least another version of iOS.

    这篇关于iOS网路库建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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