Software Archive
Read-only legacy content
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
17065 Discussions

Difference between app built with XDK and app built with PhoneGap

Alex_Hang
New Contributor II
130 Views
I am building an app that communicates with a server. Everything works fine when I build the app using the XDK Cloud Build Service, but when I build the app using PhoneGap Build (after packaging it with XDK) it doesn't communicates with the server when it has to send data. For example, the messaging service I created is receiving messages, but does not sends any one(only when built with PhoneGap, same app, without any modification is working perfectly when built with XDK) I use PHP and SQL for Backend, but I don't think that is the problem. Is there any setting I need to do when building with PhoneGap to make it work like when built with XDK? Thank you, and sorry for the question. Alex Hang
0 Kudos
6 Replies
PaulF_IntelCorp
Employee
130 Views

My suspicion is something to do with the whitelist settings, or the specific version of the whitelist plugin, or possibly some CSP rules. Are you building a Crosswalk app or without Crosswalk? What version of CLI are you specifying? Are you changing anything in the exported ZIP (especially in the config.xml) before you send it to PGB? Does you messaging service require some sort of authentication mechanism that is based on the signature certificate or the App ID?

Alex_Hang
New Contributor II
130 Views

I have not changed anything in the ZIP.

I have nothing in the whitelist when building with XDK, but still works.

There is something more, when built with XDK, the app has 22 MB size, while when built with PGB it has 1.8 MB.

 

Alex_Hang
New Contributor II
130 Views

Sorry for writing another post, but this is what I get from creating the app with cordova CLI

Untitled.png

PaulF_IntelCorp
Employee
130 Views

Alex Hang wrote:

I have nothing in the whitelist when building with XDK, but still works.

This will be okay if you do not access anything external, but if you do need external access it is likely to cause problems.

Alex Hang wrote:

There is something more, when built with XDK, the app has 22 MB size, while when built with PGB it has 1.8 MB.

This implies that the XDK build is WITH Crosswalk and the PGB build is WITHOUT Crosswalk, which shouldn't happen, because if your project is setup to build with Crosswalk in the XDK it should export the right config parameters to make it also build with Crosswalk on PGB.

PaulF_IntelCorp
Employee
130 Views

Alex Hang wrote:

Sorry for writing another post, but this is what I get from creating the app with cordova CLI

Regarding the Cordova CLI error, looks to me like there is something fundamentally wrong with your Cordova CLI installation. To confirm you have Cordova CLI properly installed on your system, see the "simple test" in the section titled "Requirements to Build with Cordova CLI" on this page > https://software.intel.com/en-us/xdk/docs/build-xdk-app-with-phonegap-cordova-cli <, essentially:

> cordova create test
> cd test
> cordova platform add android
> cordova prepare
> cordova build android

 

Alex_Hang
New Contributor II
130 Views

Thank you for the help sir, I managed to make the app working on Phonegap like it works with the XDK build system.

It looks like the only thing I had to do was to disable Crosswalk.

Reply