[英]How to connect from your iOS app to a backend server? how to read, modify and fetch data to backend server?
I am new in developing iOS applications.我是开发 iOS 应用程序的新手。 I like to learn communication between my app and a specific back-end server(which is written in ruby).我喜欢学习我的应用程序和特定后端服务器(用 ruby 编写)之间的通信。 I would like to learn how to read, fetch and modify data on the back-end server?我想学习如何在后端服务器上读取、获取和修改数据? I do not have any idea where I should start?我不知道应该从哪里开始? I am very welcome if you could refer me to any online resource/tutorial for this topic.如果您可以向我推荐有关此主题的任何在线资源/教程,我非常欢迎。
First, you have to create an API in ruby.首先,您必须在 ruby 中创建一个 API。 Here is a tutorial on how to do it: https://www.codeschool.com/courses/surviving-apis-with-rails .这是有关如何执行此操作的教程: https : //www.codeschool.com/courses/surviving-apis-with-rails 。
After that, when you are sure that your API is working correctly, you can write a service for HTTP communication.之后,当您确定您的 API 正常工作时,您就可以编写用于 HTTP 通信的服务。 You can do it by yourself, but in my opinion, a much better option would be using the third party for that.您可以自己完成,但在我看来,更好的选择是使用第三方。 I prefer using AFNetworking: https://github.com/AFNetworking/AFNetworking .我更喜欢使用 AFNetworking: https : //github.com/AFNetworking/AFNetworking 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.