Getting Started

  1. What Do I Upload?
  2. How Do I Structure My Application?
  3. How Do I Configure My Application?
  4. Where can I Get Help?

1. What Do I Upload?

Preparing the Assets

PhoneGap and PhoneGap Build use an open packaging model that follows the W3C Widget Packaging specification. This consists of a config.xml file, and your web assets (html, js, css, images, etc). You should not be uploading native application code files (.c, .h, .m, java, etc). See the PhoneGap Hello World Application for a basic example. This application is also explained in more detail here.

Don't include phonegap.js or plugin files

PhoneGap Build will inject phonegap.js, cordova.js (identical sources), and any files required by your plugins, into the root of your www. This is because these files differ depending on the versions of PhoneGap and any plugins you are using. However you do still need to source phonegap.js or cordova.js (both are available and they are identical) from your html files.

<script src="cordova.js"></script>

For maximum sizes of apps, see the plans page.

2. How Do I Structure My Application?

PhoneGap Build's only minimum requirement for your application structure is that there is an index.html present inside your app. For instance you can upload a single file called index.html and it will be packaged as an app.

While this is a minimum requirement most certainly you will need a much more complicated structure that will contain your app's javascript files, splash screen and icon images, media files, and any other payloads required by your app. See the app project structure section for more information on how to structure your uploaded assets.

.pgbomit is a file that you can create and add to a directory that signifies to PhoneGap Build that it SHOULD NOT include the contents of that directory as source for the native application. This folder, however, can be used to store any files needed during the PhoneGap Build process up to the compile step. A typical use case is for a directory containing the icons and splashcreens for an app. Place .pgbomit in that directory and none of those files/directories will be included in the binary app package, except those copied and used for icons and splashscreens for a specific platform.

Please note that the .pgbomit file is a placeholder file only, it is not read and its only function is to highlight a directory. It is not like .gitignore or other file types that can contain patterns.

3. How Do I Configure My Application?

You'll need an application configuration file, or config.xml, in your app package to configure how your app is built. This includes PhoneGap version, icons and splash screens, platforms, and much more. See the configuration section for more on the config.xml file.

4. Where can I get help?

Please search all communication channels prior to posting questions to help us reduce repetition and keep the forums useful and efficient! Here's some channels:

Edit this page on GitHub