facebook

Building MyEclipse PhoneGap Applications for Distribution

This tutorial focuses on building PhoneGap applications using the PhoneGap remote build services. You can also build PhoneGap applications locally, and the requirements for local builds are mentioned in this tutorial where Build wizard options are discussed.

*PhoneGap projects require MyEclipse 2015.

In this tutorial, you will learn how to:

  • Customize the configuration file
  • Build an application using remote services

Update: Development of GapDebug has been discontinued. Read the End of Life Notice for more information.


Note: Mobile development was removed in MyEclipse 2016. This tutorial only applies to MyEclipse 2015.

1. Customize the PhoneGap Configuration File

Before building PhoneGap applications, you want to be sure your configuration is customized with your specific settings. You can build with default settings; however, you likely want to include your own icons and splash screens, set preferences, or select Android permissions, for example.

To edit the configuration file, double-click your project’s config.xml. Use the outline to access the pages to customize the configuration for the project.

Building PhoneGap application - configuration
Editing the PhoneGap configuration file

The PhoneGap configuration editor is available in MyEclipse 2015 CI 7 or later.

2. Build the Application File 

After you have a project created, coded, and ready to test on a device or distribute publicly, you can use the PhoneGap build services to package your project into a native iOS or Android application file.

  1. Right-click the project, and select PhoneGap>Build PhoneGap Application.Building PhoneGap application menu
    Selecting Build PhoneGap Application
  2. Select the properties that correspond with the build.
    Building PhoneGap application - build wizard
    Build properties
    Local – Uses local build tools. For Android builds, you must have the Android SDK installed, and you can build on either Windows or Mac. iOS apps can be built locally only on Mac and requires xCode to be installed. See Setting Your Environment for PhoneGap Builds.

    Remote – Uses the build services at build.phonegap.com (credentials needed as shown in Setting Your Environment for PhoneGap Builds.)

    Platform – The platform to build, Andorid or iOS. If performing an Android local build, you can click the Configure Local Build options link to specify the path to the Android SDK.
    Building PhoneGap application - local build settings
    Local build configuration
    Build Mode – Debug or Release build

    Signing Profile – Signing profiles can be configured for Android and iOS and for Debug and Production releases. See Setting Your Environment for PhoneGap Builds for information on creating signing profiles.

    PhoneGap Account –  Your credentials for build.phonegap.com. See Setting Your Environment for PhoneGap Builds for steps on entering your account credentials.
  3. Click Finish.
In the lower right corner, a process notification shows the status of the process.

Building PhoneGap application - build status
Process completion 

When the build is complete, a notification popup alerts you the build is complete, or will contain an error if the build fails.

Building PhoneGap application - build notification Build notification 

After completion, the built file is located in your project’s bin folder.

Building PhoneGap application - app file
File location