Configuring Remote Builds

Configuring Remote Builds

This section details configuration options available when using PhoneGap Build to compile an application, or when using the remote CLI option described in The Command-line Interface. For overall configuration options, see The config.xml File. For information on how to configure an app's graphics, see Icons and Splash Screens.

Specifying Platforms

By default, PhoneGap Build generates applications for every platform it can. Specify the optional <gap:platform> element if you only want to make certain platforms available. The following shows available values:

    <gap:platform name="ios" />
    <gap:platform name="android" />
    <gap:platform name="webos" />
    <gap:platform name="symbian" />
    <gap:platform name="blackberry" />
    <gap:platform name="winphone" />

Specifying the PhoneGap Version

PhoneGap Build allows you to control which version of PhoneGap to use when compiling a project remotely. Set the phonegap-version preference to any of the following values: 2.5.0, 2.7.0, 2.9.0, or the default 3.0.0:

    <preference name="phonegap-version" value="2.9.0" />

All PhoneGap versions prior to 2.5.0 are deprecated. Specifying an unsupported version number prevents the project from building.

Android Preferences

The following preferences affect how Android apps compiled with PhoneGap Build run:

The following preferences affect how Android projects compile on PhoneGap Build. They correspond to the usesSdk attributes in the AndroidManifest.xml file, for which details are available in Android's documentation.

iOS Preferences

The following preferences apply to iOS projects compiled with PhoneGap Build:

BlackBerry Preferences

The following preference applies to BlackBerry projects compiled with PhoneGap Build:

Custom URL Schemes

The iOS platform allows you to register custom URL schemes to field navigation links from other applications. The following example defines two:

    <gap:url-scheme name="com.acme.myscheme" role="None">
      <scheme>pgbr</scheme>
      <scheme>pgbw</scheme>
    </gap:url-scheme>

The optional name attribute defaults to the current application's id set by the config.xml file's <widget> element.

The optional role attribute declares how the app might be able to handle data resulting from the link. The default value of None does not specify any behavior. For details, see Apple's documentation.

The config.xml file may contain any number of <gap:url-scheme> elements. Each must feature at least one child <scheme> element.

Custom Debug Server

The debug-server feature allows you to use a custom Weinre instance for your application. By default, PhoneGap Build uses http://debug.build.phonegap.com, but you can change this by adding markup such as the following to your config.xml and changing the key:

    <feature name="debug-server" required="true">
       <param name="domain" value="http://debug.custom.com"/>
       <param name="key" value="some_unique_key"/>
    </feature>

See Remote Debugging Tools for more information.