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.

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

报告相同问题?

悬赏问题

  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题