Html 从 HTML5 创建原生 iOS/Android 应用程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16268900/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 07:58:25  来源:igfitidea点击:

Creating native iOS/Android apps from HTML5

ioshtmlcordovajquery-mobiletrigger.io

提问by user2330237

Is there a tool/approach to automatically generate an app on an iOS or Android device from HTML5 or jQuery Mobile code so that the app loads/runs entirely on the mobile device itself, without requiring web access, and without the corresponding delay in load time (ie not a webapp)?

是否有工具/方法可以从 HTML5 或 jQuery Mobile 代码在 iOS 或 Android 设备上自动生成应用程序,以便应用程序完全在移动设备本身上加载/运行,而无需访问网络,并且加载时间没有相应的延迟(即不是网络应用程序)?

I have looked into a whole range of tools for this (HTML5, jQuery Mobile, trigger.io, phonegap, Appcelerator, others) and read lots of documentation and stackoverflow and other forum posts. However, I haven't yet been able to find the answer to this very basic question.

为此,我研究了一系列工具(HTML5、jQuery Mobile、trigger.io、phonegap、Appcelerator 等),并阅读了大量文档、stackoverflow 和其他论坛帖子。但是,我还没有找到这个非常基本问题的答案。

Many of the tools out there (eg trigger.io) boast that they are creating 'native' apps. However, when I built a sample iOS app to try to answer the question above for myself, the app will only run properly when the device is connected to the web, leading me to assume that it is actually a hybrid or webapp with some native components/functionality.

那里的许多工具(例如 trigger.io)都吹嘘他们正在创建“本机”应用程序。但是,当我构建了一个示例 iOS 应用程序来尝试为自己回答上述问题时,该应用程序只有在设备连接到网络时才能正常运行,这让我假设它实际上是带有一些本机组件的混合应用程序或 Web 应用程序/功能。

I suppose that for folks who have been developing apps for some time this is supposed to be obvious, but for somebody starting from fresh it is not.

我想对于已经开发应用程序一段时间的人来说,这应该是显而易见的,但对于刚开始的人来说则不然。

  • Are the existing tools able to essentially translate HTML5/jQuery Mobile into objective C, or just linke to web content?

  • Is it possible to create a mobile app using the easy-to-use, cross-platform tools that exist (I especially like jQuery Mobile and Codiqa as I was able to build a prototype so quickly) that runs fully locally on an iOS or Android device, or do you end up having to manually code the app (eg in Objective C) if you want it to be fully local to the device (not a webapp)?

  • 现有工具是否能够将 HTML5/jQuery Mobile 本质上转换为目标 C,或者只是链接到 Web 内容?

  • 是否可以使用现有的易于使用的跨平台工具(我特别喜欢 jQuery Mobile 和 Codiqa,因为我能够如此快速地构建原型)创建一个完全在本地运行在 iOS 或 Android 上的移动应用程序设备,或者如果您希望它完全位于设备本地(而不是网络应用程序),您最终是否必须手动编码应用程序(例如在目标 C 中)?

Thanks

谢谢

采纳答案by James Brady

Yes - Trigger.io apps bundle all your HTML/CSS/JS into a natively packaged app - there's no internet access required for it to work.

是的 - Trigger.io 应用程序将您所有的 HTML/CSS/JS 捆绑到一个本机打包的应用程序中 - 它不需要互联网访问即可工作。

Of course, if your app will only fully function if it has access to remote services, then the experience will degrade, but you can handle that with forge.is.connection.connected.

当然,如果您的应用程序只有在可以访问远程服务时才能完全运行,那么体验会下降,但您可以使用forge.is.connection.connected.

回答by DNG

What you are looking for is the Intel XDK. http://xdk-software.intel.com/

您正在寻找的是英特尔 XDK。http://xdk-software.intel.com/

You can build, emulate, debug, test and publish your HTML5 code as native apps directly from the XDK, for iOS, Android and Windows Mobile.

您可以直接从 XDK 构建、模拟、调试、测试和发布作为本机应用程序的 HTML5 代码,适用于 iOS、Android 和 Windows Mobile。

回答by Pork 'n' Bunny

The answer your looking for I believe is bassically No on both counts.

我相信您正在寻找的答案在这两个方面基本上都是“否”。

There is nothing to turn HTML5 into native apps on iOS or Android (Windows 8 is "native" with HTML5).

没有什么可以将 HTML5 转换为 iOS 或 Android 上的本机应用程序(Windows 8 是 HTML5 的“本机”)。

You can however use PhoneGap to create a natively packaged WebApp, and this does not require an internet connection, it can be full local, and the outcome can be very good.

但是你可以使用PhoneGap来创建一个原生打包的WebApp,这不需要互联网连接,它可以是完全本地的,结果会非常好。