简体   繁体   中英

Visual Studio Cordova app runs in Ripple not on device

I have a Cordova App (5.0.0) developed in VS2015 (RC). The application successfully makes calls to a remote web service when running under the Ripple Emulator. As soon as the application is deployed for debug to a device (In this case a Nexus 6) the call to the Web Service returns a 404 not found error. When I check the IIS logs at the other end on the server I notice that no call was made by the device to the Web Service. I also checked the URL to ensure it wasn't being changed when deployed to the Device rather than Ripple. No such luck.

This started me thinking that perhaps there are special permissions or other settings I need to make to enable the application to run in Debug on the device. Does anybody have any clues what might be up? I have trawled the net for hours trying to find something similar.

Found the answer at last. For anybody else who is tussling with VS2015 or more to the point Cordova 5.0.0

From the release notes / known issues in VS2015 (RC) here :

The Android platform contained within Cordova 5.0.0 does not have a "whitelist" plugin installed by default and therefore blocks network access by default. There are now two whitelist plugins that can be installed.

•Installing “cordova-plugin-legacy-whitelist” will cause the platform to behave the way it did in 4.x and enables the "Domain Access" list in the configuration designer. You can install it from the command line or using cordova-plugin-legacy-whitelist.git from the Custom tab of the configuration designer.

•Installing “cordova-plugin-whitelist” results in some new behaviors and introduces new config.xml elements that can be added manually by right clicking on config.xml and selecting "View Code." You can install it from the command line or using cordova-plugin-whitelist.git from the Custom tab of the configuration designer.

This mobile platform dev is all very flaky and underwhelming as an experience I have to say after coming from a predominately .NET development background.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM