angularjs - PhoneGap build - Config.XML - REST CALL fails due to 'ConnectionError' -
i've built application using phonegap build using custom config.xml
:
<?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.package" versioncode = "25" version = "1.0.1" > <name>test app</name> <description>test app</description> <icon src="res/img/icon.png" /> <icon src="res/img/icon.png" platform="android" density="ldpi" /> <icon src="res/img/icon.png" platform="android" density="mdpi" /> <icon src="res/img/icon.png" platform="android" density="hdpi" /> <icon src="res/img/icon.png" platform="android" density="xhdpi" /> <feature name="http://api.phonegap.com/1.0/network" /> <feature name="http://api.phonegap.com/1.0/file" /> <feature name="http://api.phonegap.com/1.0/device" /> <gap:plugin name="cordova-plugin-whitelist" source="npm" version="1.0.0" /> <access origin="*" /> <allow-intent href="*" /> <allow-navigation href="*" /> </widget>
added content security policy index.html:
<meta http-equiv="content-security-policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
build not break - application submitted playstore when triggering rest call application on https link error:
return status '0' / return status text ''
the application working locally correct in browser , there no problem on rest / app level.
i have feeling has missing configuration?
any welcome!
@dann, did not tell phonegap build version build. such as:
<preference name="phonegap-version" value="3.5.0" />
since did not list "preference", got latest version.
also when using whitelist latest version of phonegap, told need add more information config.xml. want reference master example https://github.com/phonegap/phonegap-start/blob/master/www/config.xml
you need add pluging
<plugin name="cordova-plugin-whitelist" version="1" />
if want limit whitelist, instead broad reference have now, read
whitelist guide
http://docs.phonegap.com/en/4.0.0/guide_appdev_whitelist_index.md.html#whitelist%20guide
for more on whitelist, recommend google group:
https://groups.google.com/forum/#!forum/phonegap
for more on phonegap build, recommend official forum
http://community.phonegap.com/nitobi
Comments
Post a Comment