Git Product home page Git Product logo

manifoldcordova's Introduction

Hosted Web Application

This plugin enables the creation of a hosted web application from a W3C manifest that provides metadata associated with a web site. It uses properties in the manifest to update corresponding properties in the Cordova configuration file to enable using content hosted in the site inside a Cordova application.

Typical manifest

{
  "lang": "en",
  "name": "Super Racer 2000",
  "short_name": "Racer2K",
  "icons": [{
        "src": "icon/lowres",
        "sizes": "64x64",
        "type": "image/webp"
      }, {
        "src": "icon/hd_small",
        "sizes": "64x64"
      }, {
        "src": "icon/hd_hi",
        "sizes": "128x128",
        "density": 2
      }],
  "scope": "/racer/",
  "start_url": "http://www.racer2k.net/racer/start.html",
  "display": "fullscreen",
  "orientation": "landscape",
  "theme_color": "aliceblue"
}

The W3C manifest enables the configuration of the application’s name, its starting URL, default orientation, and the icons it uses. In addition, it will update the application’s security policy to control access to external domains.

When the application is launched, the plugin automatically handles navigation to the site’s starting URL.

Note: Although the W3C specs for the Web App manifest consider absolute and relative URLs valid for the start_url value (e.g. http://www.racer2k.net/racer/start.html and /start.html are both valid), the plugin requires this URL to be an absolute URL. Otherwise, the installed applications won't be able to navigate to the web site.

The plugin enables the injection of additional Cordova plugins and app-specific scripts that consume them allowing you to take advantage of native features in your hosted web apps.

Lastly, since network connectivity is essential to the operation of a hosted web application, the plugin implements a basic offline feature that will show an offline page whenever connectivity is lost and will prevent users from interacting with the application until the connection is restored.

Installation

cordova plugin add cordova-plugin-hostedwebapp

IMPORTANT: Before using the plugin, make sure to copy the W3C manifest file to the root folder of the Cordova application, alongside config.xml, and name it manifest.json.

Design

The plugin behavior is mostly implemented at build time by mapping properties in the W3C manifest to standard Cordova settings defined in the config.xml file.

This mapping process is handled by a hook that executes during the before_prepare stage of the Cordova build process. The hook updates the config.xml file with values obtained from the manifest.

The plugin hook also handles downloading any icons that are specified in the manifest and copies them to the application’s directory, using their dimensions, and possibly their pixel density, to classify them as either an icon or a splash screen, as well as determining the platform for which they are suitable (e.g. iOS, Android, Windows, etc.). It uses this information to configure the corresponding icon and splash elements for each supported platform.

Getting Started

The following tutorial requires you to install the Cordova Command-Line Inteface.

Hosting a Web Application

The plugin enables using content hosted in a web site inside a Cordova application by providing a manifest that describes the site.

  1. Create a new Cordova application.
    cordova create sampleapp yourdomain.sampleapp SampleHostedApp

  2. Go to the sampleapp directory created by the previous command.

  3. Download or create a W3C manifest describing the website to be hosted by the Cordova application and copy this file to its root folder, alongside config.xml. If necessary, rename the file as manifest.json.

    Note: You can find a sample manifest file at the start of this document.

  4. Add the Hosted Web Application plugin to the project.
    cordova plugin add cordova-plugin-hostedwebapp

  5. Add one or more platforms, for example, to support Android.
    cordova platform add android

  6. Build the application.
    cordova build

  7. Launch the application in the emulator for one of the supported platforms. For example:
    cordova emulate android

    Note: The plugin updates the Cordova configuration file (config.xml) with the information in the W3C manifest. If the information in the manifest changes, you can reapply the updated manifest settings at any time by executing prepare. For example:
    cordova prepare

Using Cordova Plugins in Hosted Web Apps

The plugin supports the injection of Cordova and the plugin interface scripts into the pages of a hosted site. There are two different plugin modes: 'server' and 'client'. In 'client' mode, the cordova.js file and the plugin interface script files are retrieved from the app package. In 'server' mode, these files are downloaded from the server along with the rest of the app's content. The plugin also provides a mechanism for injecting scripts that can be used, among other things, to consume the plugins added to the app. Imported scripts can be retrieved from the app package or downloaded from a remote source.

Very briefly, these are the steps that are needed to use plugins:

  • Add one or more Cordova plugins to the app.

  • Enable API access in any pages where Cordova and the plugins will be used. This injects the Cordova runtime environment and is configured via a custom extension in the W3C manifest. The match and platform attributes specifies the pages and platforms where you will use Cordova.

    {
      ...
      "mjs_api_access": [
        { "match": "http://yoursite.com/path1/*", "platform": "android, ios, windows", "access": "cordova" },
        ...
      ]
    }
    
  • Optionally, choose a plugin mode. The default mode is client.

    Client mode

    {
    ...
      "mjs_cordova": {
        "plugin_mode": "client"
      }
    }
    

    Server mode

    {
      ...
      "mjs_cordova": {
        "plugin_mode": "server",
        "base_url": "js/cordova"
      }
    }
    

    (In 'server' mode, the Cordova files and plugin interface scripts must be deployed to the site to the path specified in base_url. Also, the cordova.js and cordova_plugins.js files for each platform need to be renamed to specify the platform in their names so that cordova.js and cordova_plugins.js become, in the case of Android for example, cordova-android.js and cordova_plugins-android.js respectively.)

To inject scripts into the hosted web content:

  • Update the app's manifest to list the imported scripts in a custom mjs_import_scripts section.

    {
      ...
      "mjs_import_scripts": [
        { "src": "js/alerts.js" },
        { "src": "http://yoursite.com/js/app/contacts.js" },
        { "src": "js/camera.js", "match": "http://yoursite.com/profile/*" },
        ...
      ]
    }
    
  • For app-hosted scripts, copy the script files to the Cordova project. The path in mjs_import_scripts must be specified relative to the 'www' folder of the project. Server-hosted scripts must be deployed to the site.

The following wiki article provides additional information about these features.

Offline Feature

The plugin implements an offline feature that will show an offline page whenever network connectivity is lost.

The feature is enabled by default, but can be disabled with the following property in the manifest.json file.

{
  ...
  "mjs_offline_feature": false
  ...
}

By default, the page shows a suitable message informing the user about the loss of connectivity. To customize the offline experience, a page named offline.html can be placed in the www folder of the application and it will be used instead.

  1. To test the offline feature, interrupt the network connection to show the offline page and reconnect it to hide it.

    Note: The procedure for setting offline mode varies depending on whether you are testing on an actual device or an emulator. In devices, you can simply set the device to airplane mode. In the case of simulators there is no single method. For example, in Ripple, you can simulate a network disconnection by setting the Connection Type to 'none' under Network Status. On the other hand, for the iOS Simulator, you may need to physically disconnect the network cable or turn off the WiFi connection of the host machine.

  2. Optionally, replace the default offline UI by adding a new page with the content to be shown while in offline mode. Name the page offline.html and place it in the www folder of the project.

Icons and Splash Screens

The plugin uses any icons specified in the W3C manifest to configure the Cordova application. However, specifying icons in the manifest is not mandatory. If the W3C manifest does not specify any, the application will continue to use the default Cordova icon set or you can enter icon and splash elements manually in the config.xml file and they will be used instead. However, be aware that the plugin does replace any such elements if it finds an icon in the manifest that matches its size. Typically, manifest entries reference icons hosted by the target site itself and should reference suitable icons for each platform supported by the application, as described in the W3C spec. The plugin takes care of downloading the corresponding files and copies them to the correct locations in the project.

When you run cordova prepare, the plugin will download from the hosted site all image assets in the manifest, if they are available, and it will store them inside the Cordova project using their relative paths as specified in the manifest. You can add any icons missing from the site or replace any icons that were downloaded by simply copying them to the correct location inside the project always making sure that they match the relative path in the manifest. Once the images are in place, building the project will copy the icons to each platform specific folder at the correct locations.

For example, the following manifest references icons from the /resources path of the site, for example, /resources/android/icons/icon-36-ldpi.png. The plugin expects the corresponding icon file to be stored in the same path relative to the root of the Cordova project.

{
    "name": "Super Racer 2000",
    "short_name": "Racer2K",
    "icons": [
        {
            "src": "/resources/android/icons/icon-36-ldpi.png",
            "sizes": "36x36"
        },
        {
            "src": "/resources/android/icons/icon-48-mdpi.png",
            "sizes": "48x48"
        },
        ...
        {
            "src": "/resources/ios/icons/icon-40-2x.png",
            "sizes": "80x80"
        },
        ...
        {
            "src": "/resources/windows/icons/Square44x44Logo.scale-240.png",
            "sizes": "106x106"
        },
        ...
    ],
    "scope": "/racer/",
    "start_url": "http://www.racer2k.net/racer/start.html",
    "display": "fullscreen",
    "orientation": "portrait"
}

Navigation Scope

For a hosted web application, the W3C manifest defines a scope that restricts the URLs to which the application can navigate. Additionally, the manifest can include a proprietary setting named mjs_extended_scope that defines an array of scope rules each one indicating whether URLs matching the rule should be navigated to by the application. Non-matching URLs will be launched externally.

Typically, Cordova applications define scope rules to implement a security policy that controls access to external domains. To configure the security policy, the plugin hook maps the scope rules in the W3C manifest (manifest.json) to suitable <allow-navigation> elements in the Cordova configuration file (config.xml). For example:

Manifest.json

...
   "start_url": "http://www.xyz.com/",
   "scope":  "/", 
   "mjs_extended_scope": [
     { "url": "http//otherdomain.com/*" },
     { "url": "http//login.anotherdomain.com/" }
   ]
...

Config.xml

...
<allow-navigation href="http://www.xyz.com/*" />
<allow-navigation href="http://otherdomain.com/*" /> 
<allow-navigation href="http://login.anotherdomain.com/" />
...

Methods

Even though the following methods are available, it should be pointed out that calling them is not required as the plugin will provide most of its functionality by simply embedding a W3C manifest in the application package.

loadManifest

Loads the specified W3C manifest.

hostedwebapp.loadManifest(successCallback, errorCallback, manifestFileName)

Parameter Description
successCallback A callback that is passed a manifest object.
errorCallback A callback that executes if an error occurs when loading the manifest file.
manifestFileName The name of the manifest file to load.

getManifest

Returns the currently loaded manifest.

hostedwebapp.getManifest(successCallback, errorCallback)

Parameter Description
successCallback A callback that is passed a manifest object.
errorCallback A callback that executes if a manifest is not currently available.

enableOfflinePage

Enables offline page support.

hostedwebapp.enableOfflinePage()

disableOfflinePage

Disables offline page support.

hostedwebapp.disableOfflinePage()

Supported Platforms

Windows 8.1
Windows Phone 8.1
iOS
Android

Windows and Windows Phone Quirks

Cordova for Android and iOS platforms provide a security policy to control which network requests triggered by the page (css, js, images, XHRs, etc.) are allowed to be made; this means that they will be blocked if they don't match the origin attribute of any of the <access> elements defined in the Cordova configuration file (config.xml).

The Windows and Windows Phone platforms do not provide control for these kind of requests, and they will be allowed.

Changelog

Releases are documented in GitHub.

manifoldcordova's People

Contributors

boyofgreen avatar cbarkerms avatar f2bo avatar nbellocam avatar vjrantal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

manifoldcordova's Issues

Icons from manifest - wrong name in config.xml

I think this is a bug, although there is a chance it's me misunderstanding something:

  1. Create a manifest, and add a bunch of icons, for example:
    "icons": [
        {
            "src": "/content/images/mobile/icons/mdpi/harry.png",
            "sizes": "48x48",
            "type": "image/png"
        },
        {
            "src": "/content/images/mobile/icons/hdpi/harry.png",
            "sizes": "72x72",
            "type": "image/png"
        },
        {
            "src": "/content/images/mobile/icons/xhdpi/harry.png",
            "sizes": "96x96",
            "type": "image/png"
        },
        {
            "src": "/content/images/mobile/icons/xxhdpi/harry.png",
            "sizes": "144x144",
            "type": "image/png"
        }
    ],   

Notice how the name is harry.png.

Now, when you do a cordova prepare, the icons are downloaded and copied into the cordova folder into the correct paths, BUT when they get copied to the android res folder, they are all renamed to icon.png, which is at odds with the manifest and config.xml.

When you then run the resulting app (for me, on an android device), you don't see the specified icon, just the manifold logo. I'm assuming this is because it looked for, and failed to find harry.png?

Validate that the start_url member in the manifest is a full URL

Even though a relative URL is a valid start_url according to the W3C spec, ManifoldCordova requires a full URL (because the plugin cannot determine the manifest's origin once it has been downloaded).

The plugin should validate this member and issue a suitable error message if it finds a relative URL. There should be also an initial check that the start_url member actually exists in the manifest, and if not show an appropriate error message.

ios - !gap_exec requests

I'm injecting a javascript file to do some mobile-specific things like set up notifications etc...

I just noticed that I'm getting loads of HEAD requests to my wrapped site, for the URL https://mywrappedsite.com/!gap_exec

Now, as far as I can tell, this isn't affecting the app - everything seems to be running OK, but I'm still seeing a bunch of these requests for each page load. Even if I comment out the injected script so that it doesn't do anything, I'm still seeing one hit per request.

Soooooo, it would appear that gap_exec is something that cordova uses internally to talk to internal phone hardware, correct? (Source: http://stackoverflow.com/questions/16631230/phonegap-cordova-2-7-0-exec-gap-file-not-found)

So it looks like something is ammis here? I can see on the ios specific cordova.js, line 1016:

execXhr.open('HEAD', "/!gap_exec?" + (+new Date()), true);

Now, because that url is relative - / rather than file:// I can see why this potentially might upset things for a hosted web app.

Thoughts?

Android: evaluateJavascript fallback fails

On devices that don't support the evaluateJavascript method on the WebView, the fallback using .loadUrl("javascript:" + ...) doesn't properly work either.

E/Web Console: Uncaught SyntaxError: Unexpected token % at null:1

All special chars of the script are "percent encoded" by Uri.encode() before being handed over to .loadUrl(), which seems to cause this error. I.e. it will choke on spaces in the script (%20) and such.

Simply removing the Uri.encode() call seems to fix the problem:
https://github.com/manifoldjs/ManifoldCordova/blob/master/src/android/HostedWebApp.java#L550

me.webView.getEngine().loadUrl("javascript:" + scriptToInject, false);

Tested on Android Jelly Bean 4.3, Samsung Galaxy Nexus

Breaking changes with Cordova v5.1.1

There are some breaking changes in the Windows platform (cordova-windows 4.0.0) that need to be addressed in the plugin:

  • Cordova now updates the StarPage property for windows manifests in the "prepare" phase (using content src property from config.xml). Since the plugin sets the wrapper.html start page in the config.xml after the "prepare" phase, the changes never take effect.
  • There are new icon sizes: 44x44 and 71x71. Default icons with the manifold logo need to be provided for those sizes

Support JavaScript interface of Cordova plugins in Windows

Since the Windows platform does not support remote content on the app container natively, the ManifoldCordova plugin adds a WebView to the landing page to render the website content specified in the manifest.json.

The current drawback of this approach is that there is no communication between the JavaScript running on the webview and the native code of the plugins. For example, the JavaScript interface of the plugins is not executed in the webview, so the JavaScript methods exposed by the plugins are not available.

ManifoldCordova freeze (Android) app

On my external page i have some javascript code that creates an event.

This event is caught by some javascript within my app.

Sometimes the app freezes completely.

It also raises the error below several times when reloading the page (not sure if this is related):

// Workaround for Windows 10 in hosted environment case
// http://www.w3.org/html/wg/drafts/html/master/browsers.html#named-access-on-the-window-object
if (window.cordova && !(window.cordova instanceof HTMLElement)) {
throw new Error("cordova already defined");
}

Incompatibility with cordova-plugin-statusbar > 0.1.6

When cordova-plugin-hostedwebapp is used together with cordova-plugin-statusbar, the WebView becomes non-interactive (cannot click on links/buttons/forms) and the scrolling breaks (somehow, scrollbars can appear).

The issue is present for any version of cordova-plugin-statusbar greater than 0.1.6 (older versions will work).

Removing this last line from createOfflineView in CDVHostedWebApp.m seems to solve the issue but there is probably a better fix to be done?

[self.viewController.view sendSubviewToBack:self.webView];

Windows 10 UWP / Visual Studio Cordova Tools... Wrapper.js copy error

i'm using visual studio 2015 with Cordova tools installed (cordova 6.1.1). Have used Cordova CLI to add hosted webapp plugin. When trying to build Windows 10 UWP version, the build process is unable to copy wrapper.js to platforms/windows/www/js/ as the js folder does not exist.

Copying wrapper js file for the windows platform from E:[REMOVED]\plugins\cordova-plugin-hostedwebapp\assets\windows\wrapper.js to E:[REMOVED]\platforms\windows\www\js\wrapper.js.
1>MSBUILD : cordova-build error : [Error: ENOENT, open 'E:[REMOVED]\platforms\windows\www\js\wrapper.js']

My workaround:
I've updated "copyFile" function in replaceWindowsWrapperFiles.js to create the copy destination directory if it doesnt exist.

Just wanted to make sure I've not done anything wrong and my workaroudn was the correct workaround.
Thanks

Working with Simple Cordova App

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.

No return from offline on iOS

We're building a mobile app using manifoldJS. On iOS, when we lose the network (e.g. airplane mode), and then re-connect, the app never returns from the offline status page.

Just to give you a bit more context, we're using these plugins:

cordova-plugin-crosswalk-webview 1.5.0 "Crosswalk WebView Engine"
cordova-plugin-device 1.1.0 "Device"
cordova-plugin-hostedwebapp 0.2.1 "HostedWebApp"
cordova-plugin-network-information 1.1.0 "Network Information"
cordova-plugin-splashscreen 3.0.0 "Splashscreen"
cordova-plugin-statusbar 2.1.0 "StatusBar"
cordova-plugin-whitelist 1.0.0 "Whitelist"
phonegap-plugin-push 1.4.4 "PushPlugin"

We have our own offline page. We're testing this on 2 separate iphones, an iphone 4 and 6, and see the same issue on both.

iOS version is latest: 9.2.1

The offline mode works fine on android.

Any ideas?

Unable to Inject scripts on remote web page

with Xcode 7 ,Cordova IOS 3.9.2 , IOS 9.2 , its keep giving error (white list rejection) on xcode console even though manifest.json has entry under mjs_extended_scope for that domain ending with "" and in config.xml domain has allow navigation plus access origin to "" .
even though xcode shows error page opens correctly in app. only problem on that page no cordova plugin is accessible.

UWP Win 10 WinJS error

Using VS 2015 with Cordova Tools, Cordova 6.1.1:
When running UWP Win 10 version of blank app with hostedwebapp plugin installed, a WinJS error pops up:

Unhandled exception at line 9, column 9 in ms-appx://[REMOVED]/www/js/wrapper.js

0x800a1391 - JavaScript runtime error: 'WinJS' is undefined

Workaround:
I've wrapped the whole content of wrapper.js into a window.load =function() { } block to make sure it's executed only when wapper.html has loaded.
Seems to do the trick.

Just wanted to make sure that this is a correct workaround.
Thanks!

Cannot find module '../../node_modules/elementtree'

When building for ios, I get this warning:

The module "ConfigParser" has been factored into "cordova-common". Consider update your plugin hooks.

followed by this error:

Error: Cannot find module '../../node_modules/elementtree'

manifest.json is created before adding plugin and elementtree exists in platforms\ios\cordova\node_modules

Before_prepare hook downloads icon files again on subsequent runs

The If-Modified-Since HTTP header appears to be ignored when issuing multiple requests to the same resource.

In the before_prepare hook, calling downloadImage multiple times using the same inputUri always returns "200 OK" and downloads the image every time. It should return "304 - Not Modified" for subsequent requests.

This behavior can be seen in ManifoldJS which calls cordova add platform, cordova prepare, and cordova build in quick succession. Executing the same sequence from the command line works as expected.

Android (at least) Offline screen not showing when launching the app offline

First of all, great work! I'm new to this mobile world, and Manifold has been providing something that I see as a very needed glue between Cordova and a hosted web app.

So, the problem is:

on Android, when I run the application on my device with Android Studio, if I have no Internet connection, the browser's default offline page will show instead of Cordova's default message or the custom offline.html.

Launching the app online and switching to offline works as expected though

The default security policy is restrictive for a common case

Steps to reproduce:

$ manifoldjs http://www.microsoft.com -p ios
$ cd WwwMicrosoftCom/cordova/
$ cordova run ios

The end result looks something like below:

screen shot 2015-07-16 at 12 10 47

This happens, because the cross-origin resource access to download CSS files (and other resources) is blocked, which is caused by ManifoldCordova removing the "full access" rules that are created by cordova create by default (see https://github.com/manifoldjs/ManifoldCordova/blob/8e5b457c1e16cfc9c56308c5d1f26e340f48ae62/scripts/updateConfigurationBeforePrepare.js#L139).

The best default security policy would be such that it is as close as possible to the security policy enforced in modern Web browsers and honors related standards like CORS and CSP.

[Windows] App Cert Kit tests not passing for UTF-8 file encoding

Error messages:

<TEST INDEX="49" NAME="UTF-8 file encoding" DESCRIPTION="Packages containing an HTML5 Windows Store app must have correct file encoding." EXECUTIONTIME="00h:00m:02s.29ms">
  <RESULT><![CDATA[FAIL]]></RESULT>
  <MESSAGES>
    <MESSAGE TEXT="File D:\Projects\MyApps\WATDocs\platforms\windows\build\windows\debug\anycpu\AppX\www\js\wrapper.js is not properly UTF-8 encoded. Re-save the file as UTF-8 (including Byte Order Mark)." />
    <MESSAGE TEXT="File D:\Projects\MyApps\WATDocs\platforms\windows\build\windows\debug\anycpu\AppX\www\wrapper.html is not properly UTF-8 encoded. Re-save the file as UTF-8 (including Byte Order Mark)." />
    <MESSAGE TEXT="File D:\Projects\MyApps\WATDocs\platforms\windows\build\windows\debug\anycpu\AppX\www\css\wrapper.css is not properly UTF-8 encoded. Re-save the file as UTF-8 (including Byte Order Mark)." />
  </MESSAGES>
</TEST>

Change Plugin Name

The repo for this plugin is called Manifold Cordova, and the plugin itself is called cordova-plugin-hostedwebapp. This plugin is pretty useful for a general cordova app to detect network issues and display an offline page.
Please consider re-naming this plugin to cordova-plugin-offlinepage to better reflect its purpose.

Review offline experience

This concern was raised in #23:

Currently, an offline overlay is automatically displayed when the connection is lost. However, there are scenarios when the page was properly loaded, and the user wants to continue seeing the content of the page even if the device is eventually disconnected.

The behavior should be reviewed so that:

  • When the connection is lost, let the user keep seeing the app's content and do not show the offline overlay
  • If the user performs an action that requires Internet connection and there is no connection, show the offline overlay
  • When the connection is restored, hide the offline overlay

We should look at the Cordova's ErrorUrl preference which might cover this scenario.

Cordova iOS 4.x support

Is there any plans to support cordova ios 4.x ? What are the issues preventing this to work ?

Update Cordova?

I'm running the latest version of Cordova, which means I get deprecation warnings because this plugin requires very outdated versions of iOS and Android.

Installing "cordova-plugin-hostedwebapp" for android
Plugin doesn't support this project's cordova-android version. cordova-android: 5.1.1, failed version requirement: <=4.1.1
Skipping 'cordova-plugin-hostedwebapp' for android
Installing "cordova-plugin-hostedwebapp" for ios
Plugin doesn't support this project's cordova-ios version. cordova-ios: 4.1.1, failed version requirement: <=3.9.2
Skipping 'cordova-plugin-hostedwebapp' for ios

Any chance of getting this updated anytime soon?

[Feature] Catch non-200 HTTP responses and try to reload page (in 1 minute?)

I have deployed the manifoldjs to some installations now and it is working fine!

However, for my project it would be really helpfull if the manifold shell could detect if a page change was correct, a.k.:

first, you are on page /test
then you reload page with (location.reload()), but the server has an issue and gives back 500,
* then the script waits 1 or 5 minutes, and retries to load page again. *
The same for other non-200 responses.

Add extended splash screen for Windows

Currently, on app startup, the sample content of the index.html page generated by cordova is shown a few seconds before the webview is created and the content of the target website is shown, which causes an odd experience.

Instead, a good alternative would be to present an "extended splash screen" to the user until the plugin completes the initialization phase.

Add support in Windows to control web page requests

Cordova Android and iOS provide additional support to control which network requests triggered by the page in the webview (css, js, images, XHRs, etc) are allowed to be made; this means that any content requested by the page that does not belong to the whitelist will be blocked.

This is currently not supported by Windows

cordova.plugins not available in webview?

Hi and thanks for this nice plugin.

I have setup the plugin according to the tutorial.
I also included some plugins, for example the ionic-keyboard-plugin.
Now when I chrome://inspect on my device, cordova.plugins does not exist. It seems like the page is loaded without the plugins?

My manifest:

{
"lang": "en",
"name": "rd",
"short_name": "rd",
"icons": [{
"src": "icon/lowres",
"sizes": "64x64",
"type": "image/webp"
}, {
"src": "icon/hd_small",
"sizes": "64x64"
}, {
"src": "icon/hd_hi",
"sizes": "128x128",
"density": 2
}],
"scope": "/",
"start_url": "https://linkedin.com",
"display": "fullscreen",
"orientation": "landscape",
"theme_color": "aliceblue",
"mjs_api_access": { "match": "*", "platform": "android", "access": "cordova" }
}

The offline event works well!

Windows 10 UWP Support?

Does this plugin currently support creating UWP projects for Win10? I noticed in the doc only Windows 8.1 is listed as supported.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.