简体   繁体   English

有没有办法自动将网络应用程序转换为iPhone或Android原生应用程序?

[英]Is there a way to automate conversion of web app to iphone or android native app?

I came across this link: http://ofps.oreilly.com/titles/9780596805784/ which seems to suggest web app can be converted to native iphone without writing a single line of objective-c code. 我遇到了这个链接: http//ofps.oreilly.com/titles/9780596805784/这似乎建议网络应用程序可以转换为本机iphone而无需编写一行objective-c代码。 But the book mentioned there is outdated now and things may have changed a lot. 但是现在提到的那本书已经过时了,事情可能已经发生了很大的变化。 Are there open source software that will allow me to automatically convert my web application to native iphone ( or android) application? 是否有开源软件可以让我自动将我的Web应用程序转换为本机iphone(或android)应用程序? By the way my web application is html5 canvas based animation application with lot of html and css as well. 顺便说一下,我的web应用程序是基于html5画布的动画应用程序,还有很多html和css。

PhoneGap doesn't generate native code for you: it creates an application consisting of a WebView and throws your HTML code on it. PhoneGap不会为您生成本机代码:它会创建一个由WebView组成的应用程序,并在其上抛出HTML代码。 From personal exerience I can add that the performance is quite slow, on both iPhone and Android, compared to a native app. 从个人的经验来看,我可以补充一点,与原生应用相比,iPhone和Android的性能都相当缓慢。 jqTouch creates a nice way to access your web application, but the application remains a web application residing on your site, plus you have to use some jquery for styling. jqTouch创建了一种访问Web应用程序的好方法,但应用程序仍然是驻留在您网站上的Web应用程序,而且您必须使用一些jquery进行样式设置。 Apparently the only one that actually does generate native code is Appcelerator Titanium . 显然,实际生成本机代码的唯一一个是Appcelerator Titanium On RhoMobile I never managed to get to the point to actually write some Ruby code because you have to know all the Ruby in he word just to install it on your Mac. RhoMobile上,我从未设法实际编写一些Ruby代码,因为你必须知道他所说的所有Ruby才能在Mac上安装它。 So the verdict was to sit down and develop the app in objective-c. 因此,判决是坐下来开发Objective-c中的应用程序。

你看过PhoneGap吗?

Simple steps to put your html app into iOS native container, without coding: 将html应用程序放入iOS本机容器的简单步骤,无需编码:

  • Download xCode 下载xCode
  • Download simple web view app from https://github.com/nomtek/iOSWebViewApp https://github.com/nomtek/iOSWebViewApp下载简单的Web视图应用程序
  • Open simple web view app within xCode 在xCode中打开简单的Web视图应用程序
  • Add your HTMLs to the project file structure 将HTML添加到项目文件结构中
  • Run your app and voila :) 运行你的应用程序和瞧:)

This approach is good if you don't need access to any phone specific features, just a standard Web View. 如果您不需要访问任何特定于手机的功能,只需要标准的Web视图,这种方法就很好。 Loading time will be short as this approach doesn't load any extra libraries. 加载时间很短,因为此方法不会加载任何额外的库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM