The minimum required files and folders for the phonegap-build project are:
─ www ├─ res │ ├─ icon │ │ ├─ android │ │ ├─ ios │ │ ├─ windows-phone │ │ └─ ... │ ├─ splash │ │ ├─ android │ │ ├─ ios │ │ ├─ windows-phone │ │ └─ ... │ └─ .pgbomit ├─ index.html ├─ config.xml ├─ icon.png └─ splash.png
Place the index.html
file in the root www
folder; it will be the first screen in your app. The other HTML pages don't have to be in the root. Similarly, it's entirely up to you where to put your images, CSS, and script files because you will be referencing them in index.html
and other HTML files as you usually do in any website project.
Also place the config.xml
file in the root www
folder. This file holds all the settings for your app.
Additionally, place the default icon icon.png
and splash-screen splash.png
images in the root www
folder. Then in the res
folder, you can place all your icons and splash-screens for the different platforms and screen resolutions. It is recommended (but not mandatory) to organize them into folders like the illustration above, a folder for the icons and another for the splash-screens, and in each of them a folder for each platform you want to support, and finally in each folder an image for each screen resolution. The names of these files can be anything you want because you will be referencing them in the config.xml
file.
It is recommended to place an empty file named .pgbomit
in the res
folder. This file tells the phonegap-build service to only include the files related to the platform being built. If you don't have a .pgbomit
, the phonegap-build service will include all the images in every platform, which increases the file size of your apps unnecessarily.
All other files & folders (e.g. the plugins that you use in your app) must be placed outside the www
folder, because they must not be uploaded to the phonegap-build service. The phonegap-build service will add all the required plugins listed in your config.xml
file.