Build using PhoneGap* Build

Please see this updated article for the latest information regarding exporting to PhoneGap Build > https://software.intel.com/en-us/xdk/article/build-your-intel-xdk-mobile-app-using-phonegap-build <


This document assumes that you have successfully exported your Intel XDK project using the Cordova Build Package export tool. For instructions on how to export your project, see the doc page titled Export to PhoneGap Build and Cordova CLI.

Submit the ZIP File to PhoneGap Build

The ZIP file generated by the Cordova Build Package export tool is ready for use with PhoneGap Build. You must have an Adobe PhoneGap account to build your app using PhoneGap Build.

Free PhoneGap Build account is limited to one “private” app slot that can be no larger than 50MB in size and does not support private plugins.

Documentation for PhoneGap Build is available on-line. The FAQ section is short and worth reviewing, especially regarding which versions of Cordova CLI are supported and where to find community support for PhoneGap Build.

Please read this PhoneGap Build FAQ if you see this message: "This app isn't using the latest version of PhoneGap. We recommend upgrading ..." after submitting your exported ZIP file.

Do not build with CLI 7.x or later until you have successfully built your app using CLI 6.x!!

The version of CLI specified in the config.xml file exported by the Intel XDK is the closest equivalent to the version of CLI specified in your Intel XDK project's Build Settings. Since PhoneGap Build is regularly updated to offer the latest version of Cordova CLI, the version specified in the exported config.xml file is likely not the "latest version" of PhoneGap Build.

IMPORTANT: if you change Build Settings or add/remove plugins using the Projects tab of the Intel XDK, you must export a new ZIP file that contains an updated config.xml file and submit that new ZIP file to PhoneGap Build.

Transferring Signing Certificates to PhoneGap Build

iOS Signing Certificates:

It is much easier to create a new set of iOS signing certificates, using the iOS signing instructions provided by PhoneGap Build, than it is to transfer the iOS developer certificates stored in the Intel XDK build system to PhoneGap Build.

If you have trouble creating your iOS signing certificates on a Mac (when using the Mac instructions), use the Windows iOS signing certificate instructions, instead. The instructions to create an iOS signing certificate on a Windows PC will work on all platforms (Windows, Mac and Linux).

Windows Signing Certificates:

Likewise, it also simpler to create a new Windows signing certificate for use with PhoneGap Build using your Microsoft Developer Account. The process is explained in the PhoneGap Build signing instructions for Windows.

Android Signing Certificates:

IMPORTANT: if you have never published an APK to an Android store you can skip this section and create a new signing certificate by following the PhoneGap Build signing instructions for Android.

If you have published an APK to an Android store, using the Intel XDK, you must continue to use the same Android signing certificate to publish updates to your app. This means you must use your Intel XDK developer certificate to build and sign your APK when using PhoneGap Build (if you are only debugging your app you can use the default signing certificate that PhoneGap Build automatically provides).

Find the developer certificate you have been using to sign your published apps, in the Intel XDK Certificate Management tool. From there download the certificate and add it to your PhoneGap Build account, following these PhoneGap Build instructions:

If the signing certificate you used to publish your APK is not in the Intel XDK Certificate Management tool, we cannot help you retrieve it, the only certificates stored by the Intel XDK build system are those that you can download directly from the Certificate Management tool, under the Account Settings icon, as shown above.

If you have never converted your Android "legacy" certificate you must first do so before you can download it using the Certificate Management tool; see this video for help with that process. If you are not seeing all the fields in the certificate management dialogs, please see this forum post for help.

When it comes time to build your Android app, with the signing certificate you transferred to PhoneGap Build from the Intel XDK, you will be asked by PhoneGap Build for both a certificate password and a keystore password. Any keystore file you created with the Intel XDK and downloaded from the Certificate Management tool contains a single certificate. When you created that keystore using the Intel XDK you were given the opportunity to use one password for both the certificate and the keystore; in that case, submit that one password to both PhoneGap Build password fields to unlock your Intel XDK signing certificate when you import it into PhoneGap Build; otherwise, provide both passwords.

IMPORTANT! PhoneGap Build does not provide a means to export any keystore you import into their certificate management tool. Always keep a copy of your keystore in a safe place and remember the password(s). Once deleted or lost, we cannot help you retrieve that information!

Building with Crosswalk

The Crosswalk project was retired in February, 2017. We recommend you change your Build Settings to build for Android 4.4 (minimum API level 19) and later and discontinue using Crosswalk unless your application truly requires it. Cordova applications that run on Android versions 5 and above will see little or no benefit from using Crosswalk, unless you are using APIs that are unique to the Crosswalk runtime. If you have been using Crosswalk and choose to stop using it, you may experience some issues with the Android "versionCode" number; see this article for help with Android versionCode issues.

If your project is configured to build for Crosswalk on Android, the exported config.xml file includes a preference tag that directs PhoneGap Build to create a "multi-architecture" APK file. This is different than the cloud-based Intel XDK build system, which created two "single-architecture" APK files that were delivered in a single ZIP file. This behavior is caused by the following tag:

    <preference name="xwalkMultipleApk" value="false" />

A “multi-architecture” Crosswalk APK file contains both the x86 and the ARM Crosswalk 32-bit libraries in a single APK file. This tag is added because PhoneGap Build will only return a single APK file when it performs a build.

You can unzip any multi-architecture APK you build to see both Crosswalk libraries included in the package.

Removing the xwalkMultipleApk tag from the config.xml file (or changing the tag “value” to “true”) will result in generating two APK files, but they will not be bundled into a single ZIP file. Unfortunately, PhoneGap Build will only return one Crosswalk APK file to you, so changing this tag value to "true" is not advised if you are building a Crosswalk app with PhoneGap Build.

Using the ‘xdk-to-cli’ Node.js Script

If you are unable to successfully create a ZIP file using the Cordova Build Package tile, or you want more control over that process, you may need to use this xdk-to-cli Node.js script. Full instructions and requirements are provided in the script’s README file.

Using xdk-to-cli with PhoneGap Build

This script does not create a ZIP file, it only creates three target- specific build configuration files. The config files it creates are written to the root folder of your Intel XDK project.

To create a ZIP file for submission to PhoneGap Build:

  • Create a config.xml file from the relevant config.*.xml files (per the instructions in the script’s README) and save it to the root of your Intel XDK project folder.
  • ZIP the contents of the entire Intel XDK project folder and submit it to PhoneGap Build (PhoneGap Build will ignore the plugins folder in the ZIP file).

If the resulting ZIP file is too large for submission to PhoneGap Build, you can exclude the plugins folder (and any other extraneous folders and files) from the ZIP, to save space. The plugins folder is not needed because PhoneGap Build uses the <plugin> tags in your config.xml file to retrieve the plugins required by your application.

For more complete information about compiler optimizations, see our Optimization Notice.