REST API iOS 开发
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7108908/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
REST API iOS development
提问by JRafaelM
I'm having lots of trouble setting up the RestKit API to my app. I wonder if there is any other good API to make RESTful apps? I've just followed lots of tutorials and the github directory of the RestKit API, but I just can't get it up and running. I've seen that Xcode 4 is having problems importing this API.
我在为我的应用程序设置 RestKit API 时遇到了很多麻烦。我想知道是否有其他好的 API 来制作 RESTful 应用程序?我刚刚学习了很多教程和 RestKit API 的 github 目录,但我无法启动并运行它。我已经看到 Xcode 4 在导入这个 API 时遇到问题。
This is an old question, Nowadays, after 4 years in iOS development I use AFNetworking: https://github.com/AFNetworking/AFNetworking
这是一个老问题,如今,经过 4 年的 iOS 开发,我使用 AFNetworking:https: //github.com/AFNetworking/AFNetworking
It is quite simple to start, and can be installed using cocoapods.
上手非常简单,可以使用 cocoapods 进行安装。
采纳答案by brazo
I can suggest standard iOS classes such as NSURLConnection and NSJSONSerialization.
我可以推荐标准的 iOS 类,例如 NSURLConnection 和 NSJSONSerialization。
Here is a series of posts that explains how to use Blocks to asynchronously perform Http requests against a RESTful API: http://kerkermeister.net/series/ios-and-rest-http-connections/
以下是一系列文章,解释了如何使用 Blocks 针对 RESTful API 异步执行 Http 请求:http: //kerkermeister.net/series/ios-and-rest-http-connections/
回答by Peter DeWeese
I use ASIHTTPRequestfor RESTful client stuff in my apps.
我在我的应用程序中将 ASIHTTPRequest用于 RESTful 客户端内容。
回答by NSCry
You can use rest kit api for that. You find the details about the rest kit in followings link https://github.com/RestKit/RestKit
您可以为此使用rest kit api。您可以在以下链接中找到有关其余套件的详细信息 https://github.com/RestKit/RestKit