File and Folder Structure

Cordova Version

With a different Cordova version, the file and folder structure of a Monaca project is configured differently.

For Cordova 5.2 or lower

File/Folder Name Description
android/ Storage folder for Android application settings
ios/ Storage folder for iOS application settings
www/ Storage folder for the main body of the application
config.xml Cordova configuration file

For Cordova 6.2 and 6.5

File/Folder Name Description
plugins/ Storage folder for additional plugins
res/ Resources folder for Android, iOS and Winrt
www/ Storage folder for the main body of the application
config.xml Application configuration file

For Cordova 7.1

File/Folder Name Description
plugins/ Storage folder for additional plugins
res/ Resources folder for Android, iOS and Winrt
www/ Storage folder for the main body of the application
config.xml Application configuration file
package.json Cordova plugins management file

android Folder

Android application settings files are stored inside the android folder.

File Name Description
AndroidManifest.xml Manifest file used when running Android applications

For more information about how to use this file, please see Android Configuration File.

For Cordova 6.2 or higher, AndroidManifest.xml file is removed from Monaca framework. Therefore, in order to config Android application settings, use Cordova Custom Config Plugin .

ios Folder

iOS application settings files are stored inside the ios folder.

File Name Description
MonacaApp-Info.plist Info.plist file used when running iOS applications

For more information about how to use this file, please see iOS Configuration File.

For Cordova 6.2 or higher, MonacaApp-Info.plist file is removed from Monaca framework. Therefore, in order to config Android application settings, use Cordova Custom Config Plugin .

www Folder

Files of the application’s main body are stored here. Files and folders can be arranged freely within this www folder, but the following files and folders have special significance.

File/Folder Name Description
index.html The first page to be displayed when the application starts up. The startup file can be changed.
components/ The folder created by Monaca for all JS/CSS components used in the project.

components Folder

The folder www/components/ is for all JS/CSS components used in the project. However, the following two files exist in that folder by default regardless of what kinds of components you have added for your project.

File Name Description
loader.js A JavaScript file used by Monaca to load JavaScript libraries
loader.css A style sheet file used by Monaca to load CSS libraries

The loader.js and loader.css files must be read from an HTML file.

Each component will create its own folder within (one level below) www/components/ folder.

loader.js file also loads cordova.js file.

plugins Folder

If you import a Cordova plugin using ZIP file, it will be stored inside this folder. However, if you import the plugin using package URL/Plugin ID, the plugin file will be downloaded during build.

config.xml File

The config.xml file is a settings file controlling various settings of Cordova. Please refer to the following documentations regarding how to edit config.xml file for Android and iOS:

For Cordova 6.2 or higher, config.xml file is also used to config either Android or iOS application settings. Please refer to Cordova Custom Config Plugin .

See Also: