cordova-whitelist-plugin, including the addition of the
allow-intentelements. You must add this plugin to enable and restrict network access in your application.
Whitelist (Pre Cordova 4.x)
The access element provides your app with access to resources on other domains - in particular, it allows your app to load pages from external domains that can take over your entire webview.
Your application can contain zero or many access elements.
A blank access tag -
<access /> - denies access to any external resources. A wildcard -
<access origin="*" /> - allows access to any external resource.
<?xml version="1.0" encoding="UTF-8" ?> <widget xmlns = "http://www.w3.org/ns/widgets" xmlns:gap = "http://phonegap.com/ns/1.0" id = "com.phonegap.example" versionCode = "10" version = "1.0.0" > <!-- versionCode is optional and Android only --> <name>PhoneGap Example</name> <description> An example for phonegap build docs. </description> <author href="https://build.phonegap.com" email="email@example.com"> Hardeep Shoker </author> <!-- This allows your app to load assets from all *.phongap.com domains --> <access origin="http://phonegap.com" subdomains="true" /> </widget>
The behaviour of the access element is heavily dependent on the platform you're deploying to - we have a blog post with more information. It is also likely to vary between different releases of PhoneGap - we'll work to maintain sane defaults and configurability for PhoneGap Build users.Edit this page on GitHub