-
Notifications
You must be signed in to change notification settings - Fork 93
Working with Simple Cordova App #35
Comments
Just to be clear, this plugin is meant to be added to a Cordova app. Its main purpose is to allow the creation of hosted web apps. That is, apps where the content is hosted on a web server. To do its job, it needs some details about the web content it should host. The way in which it obtains this information is to use a W3C manifest, which is a standardized mechanism to publish metadata for a web application (see http://www.w3.org/TR/appmanifest/). All the W3C manifest members are optional but the more information it has, for example, the app name and its icons, will allow it to create a more polished application. At the very least, the plugin needs the starting URL of the web application. If your concern is that a site that you wish to host does not publish its own manifest, you can always create one for it, name it manifest.json, and copy it to the root of your Cordova project. For example:
Let me know if you have any other questions. |
cc @boyofgreen I agree that this plugins is meant to be added in a Cordova app. However, the Cordova app does not need to have a manifest file. The Cordova app could simply be one that I created using the command line and that app will not have the manifest. Making the hooks check for the W3C file in such a case fails the compile step. Following Cordova's modularity principle, maybe you could spilt this plugin into 2, one that is responsible for displaying the offline page (which is super useful in a non cordova case), and another that adds the plugins ,etc. |
I'm going to open this issue back up to experiment in verion 0.1.5. I've had this ask come up again, and I think it will be of little cost to make it work in that sceneio where the developer doesn't have a concept of "web manifest" we can use general info that they can then go and override in the cordova manifest |
remove hard requirement for w3c manifest, this finally addresses the issue #35
One of the hooks in this apps looks for a W3C Manifest.json. As a result, this plugin cannot be added to a regular Cordova hook.
Does it make sense to skip the manifest steps if such a file does not exist ? This way, the plugin can be added to Cordova also.
The text was updated successfully, but these errors were encountered: