dongyuli0964 2014-02-04 10:42
浏览 115
已采纳

HTML5到App iOS [关闭]

Hi I have some question about converting a html5/php page to iOS app with Webmobi or another html5/php to app converter.

If i have a working page that i have made so it will work as a normal webpage, but that i want to run as an app on iOS so it will run on a ipad without internet connection, what do I then need to remember/think of ?

  1. Can i just use a normale mySQL database to store data ?
  2. is there sone javascript things that i can't use or will the most javascript work when converting ?
  • 写回答

1条回答 默认 最新

  • dqve65954 2014-02-04 10:48
    关注

    As a rule of thumb: if it works on the mobile browser it will work when wrapped into an app. For the actual wrapping you have several options:

    • Create an app with a webview and include the HTML from the device locally.
    • Use PhoneGap or Titanium as they do this for you and expose a javascript API for you to communicate with the device.

    It's important to understand that your app doesn't get 'converted' into native code but that it runs as a website within the app (complete with javascript and css), where the files of the site are stored locally in the application bundle.

    You cannot use MySQL as far as I know since that would require an internet connection to a remote MySQL server. You can however use WebSQL or LocalStorage which are both implemented in webkit and accessible through javascript.

    When working with dynamic content that need to be loaded from an external server I'd suggest creating an API to interact with that server. You can then retrieve data by using AJAX.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效