简体   繁体   English

将iPhone应用程序连接到远程数据库服

[英]Connect iPhone app to remote database server

New to iPhone dev here. 这里是iPhone新手。 Just wondering what's the best way to connect an iPhone app frontend (based on Cocoa touch ) to a php/MySql based backend? 只是想知道将iPhone应用程序前端(基于Cocoa touch)连接到基于php / MySql的后端的最佳方法是什么?

The iPhone application will frequently access and change data stored on our server. iPhone应用程序将频繁访问和更改存储在我们服务器上的数据。

Read about mysql framework and MCPKit framework but these are for cocoa not for cocoa touch. 阅读有关mysql框架和MCPKit框架的内容,但这些内容适用于cocoa而非cocoa touch。

so can I access mysql based backend without any web service on server side.? 所以我可以在服务器端没有任何Web服务的情况下访问基于mysql的后端。

Many thanks 非常感谢

You can create a REST Api for your PHP/mySQL. 您可以为PHP / mySQL创建REST Api。 Something like this 像这样的东西

https://github.com/gilbitron/Arrest-MySQL https://github.com/gilbitron/Arrest-MySQL

Then on the iOS side of things, you can use something like AFNetworking, to make requests to your server. 然后在iOS方面,您可以使用像AFNetworking这样的东西来向您的服务器发出请求。

https://github.com/AFNetworking/AFNetworking https://github.com/AFNetworking/AFNetworking

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM