开发者

Connecting to a remote database

Is there a framework or class that allows Cocoa and Objective-C to interface with a remot开发者_JAVA百科e database, be it SQLite, MySQL, or another (though preferably SQLite)?


You can download the source and compile this yourself but I have read that it is a pain and I think the project may be dead:

CocoaMySQL-src

However, connecting to a remote DB directly from an iPhone/iPad App is a very bad idea. Imagine someone with a jailbroken iPhone and a simple packet sniffer.... It would be incredibly easy for someone to compromise the security of your Database.

The best way to acomplish this is to wrap it in php via a web server on your remote Database server. You can then run a query on the DB with a simple http POST request and have the page return xml/json/whatever.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜