Understanding Intel XDK Cordova* Build Files

This document describes some of the directives you will see in the automatically generated Intel® XDK build config files in the root of your project directory. It can also be used to help you understand how to create an intelxdk.config.additions.xml file to modify build options that are set by the Projects tab's Build Settings and Plugins configuration panels. Adding Intel® XDK Cordova Special Build Options Using the Additions File describes that build config file.

The Adobe* PhoneGap* CLI system is based on the Apache Cordova CLI open source project. The config.xml file used to direct the cloud-based Adobe* PhoneGap Build* environment is a superset of the Cordova CLI config.xml file. Use the Intel XDK Cordova CLI export tool to generate a config.xml file that can be used with PhoneGap Build or Cordova CLI.

Because Intel XDK mobile apps are Cordova CLI apps, the Intel XDK build control files share many options with a local Cordova CLI config.xml file. The options used in the Intel XDK build configuration files are a superset of those used in the Cordova CLI config.xml file.

For each Cordova mobile app project, you can specify the Cordova CLI version under Build Settings in the Projects tab. The default and recommended version of CLI is 6.5.0. This number refers to the Cordova CLI (command-line interface) version number, not the version of the Cordova device framework (see the Apache Cordova CLI 4.0 Release Notes for a coarse explanation of this version confusion). The precise Cordova platform versions that are “pinned” to a default Cordova CLI 6.5.0 build system can be found in the Adobe PhoneGap Build Currently Supported Versions matrix.

The intelxdk.config.<platform>.xml File

The intelxdk.config.<platform>.xml file controls the behavior and application specific properties of the Intel XDK Cordova and Crosswalk build targets. This file follows the W3C Packaged Web Apps (Widgets) specification. The options used by the Intel XDK build system are subject to change.

intelxdk.config.<platform>.xml files are automatically generated by the Projects tab. A user-editable intelxdk.config.additions.xml configuration file is provided as a way to handle special case options that are not dealt with by the build GUI interface. The features described in this document can be used within that intelxdk.config.additions.xml configuration file.

Options Common to All Intel XDK Cordova Platforms

The settings described below are standard Cordova config.xml build options. Since the Intel XDK cloud-based build system was based on Cordova CLI, standard Cordova config.xml build options can be used.

For a full list of Cordova supported settings see the Apache Cordova config.xml File Documentation.

See Adding and Managing Plugins for details on how to use third-party Cordova plugins as a way of extending your app's JavaScript API for access to unique device and platform features.

Including Cordova Plugins

Do not use this mechanism to include plugins in your application!! This element is no longer supported in the intelxdk.config.additions.xml file. Please see Adding and Managing Plugins for details and reasons why using the plugin management tool is the best way to work with plugins in the Intel XDK.

Specifying Custom Icons
The icon tag provides a mechanism to add launch (home screen) icons to your application.
<icon platform="<PLATFORM>" src="<SRC>" density="<DENSITY>" height="<HEIGHT>" width="<WIDTH>" />
where:
  • <PLATFORM> indicates for which platform the launch icon will be applied. Valid platforms are android, ios and windows. If this property is not supplied, a default icon is provided by the build system.
  • <SRC> indicates the path of the icon image file relative to the SOURCE DIRECTORY in your project (see the Projects tab in the Intel XDK).
  • <DENSITY> indicates the resolution of the icon image file. This property is required for and only used by Android. Valid values are xhdpi,hdpi, mdpi, and ldpi.
  • <HEIGHT> indicates the height of the icon image file in pixels. This property is required for iOS and optional for other platforms.
  • <WIDTH> indicates the width of the icon image file in pixels. This property is required for iOS and optional for other platforms.
Details regarding icon dimensions, sizes and image types can be found on the respective platform-specific pages (links provided below, in the next section).
Including Custom Splash Screens
The splash tag gives you a way to add a custom splash screen to your application. This static image will be displayed during app initialization for a preset period of time following initialization, or until your application calls the navigator.splashscreen.hide() function, whichever comes first.
<splash platform="<PLATFORM>" src="<SRC>" density="<DENSITY>" width="<WIDTH>" height="<HEIGHT>" orientation="<ORIENTATION>" />
where:
  • <PLATFORM> indicates for which platform the splash screen image will be applied. Valid platforms are android, ios and windows. If this property is not supplied, a default image is provided by the build system.
  • <SRC> indicates the path of the splash screen image file relative to the SOURCE DIRECTORY in your project (see the Projects tab in the Intel XDK).
  • <DENSITY> indicates the resolution of the splash screen image file. This property is required for and only used by Android. Valid values are xhdpi, hdpi, mdpi, and ldpi.
  • <WIDTH> indicates the width of the splash screen image file in pixels. This property is required for iOS and optional for other platforms.
  • <HEIGHT> indicates the height of the splash screen image file in pixels. This property is required for iOS and optional for other platforms.
  • <ORIENTATION> indicates the orientation of the splash screen image. Valid values are "portrait" and "landscape." This property is currently only used by Android platforms.
Details regarding splash screen image dimensions, sizes and file types can be found on the respective platform-specific pages (links provided below, in the next section).

Platform-Specific Options

Each target platform may have additional build options that can be added to the config file. These options are specific to that platform and have no impact on other target platforms.

Follow these links for details regarding the platform-specific build options:

Intel XDK "Android Crosswalk" Build Options

Adding Chromium-specific Command-line Options
This build option adds Chromium-specific command-line options to your Crosswalk build. See this List of Chromium Command Line Switches for a complete set of command-line switches (not all command-line switches work with all Crosswalk versions).
<preference name="xwalkCommandLine" value="<OPTION>"/>
where:
  • <OPTION> specifies one or more Chromium command-line options separated by spaces.
This option works with either an embedded or shared model Crosswalk build. See Choosing Crosswalk* Build Options: Shared or Embedded for more details regarding the differences between these two build options.

Only one instance of this preference is allowed in the build configuration file.

<preference name="xwalkCommandLine" value="--show-fps-counter --ignore-gpu-blacklist" />
For more complete information about compiler optimizations, see our Optimization Notice.