douzhangli9563 2014-01-26 03:23
浏览 50

IOS App的网站[关闭]

I have a website that I've created using PHP, Mysql, and other (HTML, CSS, etc) and I'm looking into converting the website into a native Iphone App for the app store. I know quite a bit of Objective-C and have used X-code for a couple years but I'm confused about one aspect of it. I've never worked with databases from an app. The database that we have set up is just a good old fashion PHP and Mysql that we connect to. It holds all of the site's users and other information.

Therefore, what should I do about accessing this database on the phone? Is there a way to use Mysql or is there something else that I can use that would interact with the database separately? I know there is SQLite but does that work with Mysql or not?

Any tutorials or guides you could point me to also would be great. Thanks.

  • 写回答

1条回答 默认 最新

  • duanji8887 2014-01-26 08:41
    关注

    The simple answer is: don't connect an iOS app directly to the database. Think about it: you'd be embedding a username and password somewhere in the app's code, which some nefarious user will find a way to extract and exploit.

    Much better way to do it: create a simple API on your website, then pass requests from mobile users through the API. Then your server handles all database connections, authentication of users, and so on, and you haven't put your database credentials in the hands of lots of unknown individuals.

    评论

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?