Software Archive
Read-only legacy content
17061 Discussions

Ajax call not working after build app in cordova 4.1.2

parth_s_
Beginner
495 Views

Hello,

I have upgrade intel xdk. Now suddenly my ajax call is not working after build App using build.phonegap.com.

Any one have ideas ?

 

 

0 Kudos
3 Replies
Elroy_A_Intel
Employee
495 Views

Did you set the Access List under the Projects tab for your project? This field may have been set to empty.

In order to gain access to third party party websites and web services, you are required to enable the access list under the Project Panel > Build Settings.

I recommend that you include a * (asterisk) in the Access List field on the Project panel for your application. The asterisk allows for communication to any web server or site via your application or AJAX call. You can find the Domain List field with in the Cordova Hybrid Mobile App settings > Build Settings > (desired platform such as Android, iOS etc...)

For more information visit https://software.intel.com/en-us/xdk/articles/cordova-cli-412-domain-whitelisting-with-intel-xdk-for-ajax-and-launching-external-apps.

 

0 Kudos
Swati_S_Intel1
Employee
495 Views

@Parth, with the Intel XDK 2496 version, the default Cordova CLI is 5.1.1 and with Cordova CLI 5.1.1 the whitelisting model has changed and hence the config.xml will be different than what you used to see earlier. You mentioned you are using Phonegap build, You need to make sure you are using appropriate CLI there. Have you tried building using XDK build tab? Try that and see if AJAX works for your app. For the details on how to set the build settings for AJAX request with CLI 5.1.1, please see this article.

0 Kudos
Wesly_L_
Beginner
495 Views

Google translation.

Good evening!

I'm developing an app with local database which is assigned via ajax, and after the upgrade of cord 3.5 to 4.1.2 and 5.1.1, the app only works during emulation, after the build does not work anymore ... I added "*" in the whitelist and still not working .... I have no more resources to try to work!
Could someone help me? ...

Thank you already!

0 Kudos
Reply