使用UIWebView构建HTML5 iOS应用程序 [英] Building an HTML5 iOS app with UIWebView

查看:115
本文介绍了使用UIWebView构建HTML5 iOS应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一位客户建议我们只需创建一个UIWebView并将所有应用程序逻辑卸载到HTML5应用程序,只需将HTML5应用程序包装为本机iOS应用程序。这将允许我们拥有原生iOS应用程序和其他设备的良好移动应用程序。

I have a client who suggested we simply wrap an HTML5 app as a native iOS app by just creating a UIWebView and offloading all of the application-logic to the HTML5 app. This would allow us to have a "native" iOS app and a good mobile app for other devices.

然而,这让我觉得有些奇怪,我想知道这样一个计划的缺陷是什么。有没有人有这方面的经验?

However, this strikes me as a little odd and I was wondering what the pitfalls of such a plan would be. Does anyone have any experience doing this?

谢谢,
Trey

Thanks, Trey

推荐答案

您可能仍会遇到的任何陷阱,您可能会遇到的网络应用程序。不要试图做任何OpenGL类型的应用程序,但如果它更像是一个网页,那么这对你来说应该没问题。

Any pitfalls you would experience as a web app you are likely to still experience. Don't attempt to do any OpenGL sort of app but if it's more like a webpage then this should work out fine for you.

但是,使用一些框架在那里你可能会获得稍微更丰富的体验,因为您可以访问不允许使用Web应用程序的本机电话工具(振动,GPS等)。

However, using some frameworks out there you are likely to get a slightly "richer" experience in that you are able to access native phone tools that a web app isn't allowed to use (vibrate, GPS, etc.)

查看 PhoneGap 。他们缺乏大量的文档,但是有很多人使用它并且已经完成了它,你可以说。

Take a look at PhoneGap. They lack extensive documentation but there are quite a number of people using it and have already 'ran it through the gauntlet', you could say.

所有这些都说,如果你不想处理市场(iTunes,Android Marketplace等),你可以随时做一个离线的HTML5应用程序。用户转到网页的位置,它会缓存离线运行应用程序所需的所有文件。这与 Google 使用 Google Voice 在iTunes商店被拒绝后的行为类似。

All that said, if you don't want to deal with the marketplaces (iTunes, Android Marketplace, etc) you could always do an offline HTML5 app. Where the user goes to the webpage and it caches all the files that are required to run the app offline. This is a similar approach to what Google was doing with Google Voice when it was rejected from the iTunes store.

这篇关于使用UIWebView构建HTML5 iOS应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆