A version of this article was originally published as part of the Intel® XDK documentation book.
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 your Intel® XDK Mobile App to PhoneGap* Build or Cordova* CLI.
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.
A 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.
If you see the message "This app isn't using the latest version of PhoneGap. We recommend upgrading ..." after submitting your exported ZIP file, please read this PhoneGap Build FAQ; in most cases you can ignore that warning.
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 very 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.
iOS Signing Certificates:
You do not need to transfer your iOS signing certificates or mobile provisioning files from the Intel XDK to PhoneGap Build!!
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 certificate management 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 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, and only if, you have published an APK to an Android store, using the Intel XDK, you should continue to use the same Android signing certificate to publish updates to your app. This means you may want to use your Intel XDK developer certificate to build and sign your APK when using PhoneGap Build (if you are debugging your app you should 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. Then download that certificate and add it to your PhoneGap Build account following these PhoneGap Build instructions (the precise name of the certificate's alias will probably be different than what is shown in the image below):
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 32-bit Crosswalk libraries for both x86 and ARM mobile devices in a single APK file. The
xwalkMultipleApk tag is necessary because PhoneGap Build returns only a single APK file when it performs a Crosswalk build, unlike the retired Intel XDK build system, which returned a ZIP file that contained two APK files, one for x86 and one for ARM.
If you unzip a multi-architecture APK you can see both Crosswalk libraries included in the package.
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 only returns one Crosswalk APK file, so changing this tag value to "true" is not advised if you are building a Crosswalk app with PhoneGap Build.
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.
This script does not create a ZIP file, it creates three target-specific build configuration files. Those config files are written to the root folder of your Intel XDK project.
To create a ZIP file for submission to PhoneGap Build:
- Create a
config.xmlfile (per 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
pluginsfolder 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.