将服务器生成的网站转换为 PhoneGap/Cordova 应用程序?

Convert server-generated site to PhoneGap/Cordova app?

将具有服务器生成的页面(在我的例子中 Laravel/PHP)运行 的网站作为 PhoneGap/Cordova 应用程序的最省力的方法是什么?在导入 PhoneGap/Cordova.

之前,我宁愿不必将整个应用程序转换为单页应用程序

是否可以将 PhoneGap/Cordova 用作非常薄的包装器并仍然从服务器实时加载每个页面?如果是这样,请问具体如何?我认为我们不需要任何原生 phone API。

整个事情的原因是我的客户坚持 "having an app" 尽管显然我们的网站可以在移动网络浏览器中运行并且可以在用户的​​ phone 上有一个图标。

非常感谢

很遗憾,您的应用要通过 Apple App store 批准,它必须提供一些基本功能并在没有互联网连接的情况下正确显示。这至少意味着,如果您计划在服务器上生成内容,您可能需要 Cordova 插件来获取网络信息:

https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-network-information/

我会确保您熟悉 Apple 人机界面指南:

https://developer.apple.com/ios/human-interface-guidelines/overview/design-principles/

您可能还需要捆绑任何 JavaScript。 Apple 对下载代码的应用程序非常挑剔(这可以包括 JavaScript)。

这是 iOS 开发者协议的一部分。

3.3.2 Except as set forth in the next paragraph, an Application may not download or install executable code. Interpreted code may only be used in an Application if all scripts, code and interpreters are packaged in the Application and not downloaded. The only exceptions to the foregoing are scripts and code downloaded and run by Apple's built-in WebKit framework or JavascriptCore, provided that such scripts and code do not change the primary purpose of the Application by providing features or functionality that are inconsistent with the intended and advertised purpose of the Application as submitted to the App Store.

以下仅代表本人意见

我担心的是,如果您不费吹灰之力地去做,最好的情况是您将无法通过应用程序批准。最坏的情况是,它会给用户带来糟糕的体验,或者更糟糕的是,给你的客户留下糟糕的形象。做得好,给应用程序一些你不能单独在浏览器中拥有的额外功能。我会就此向您的客户提出建议,看看他们是否想要一款合适的应用程序来吸引他们的客户并为他们提供良好的体验。