Background: I have a cordova 3.0.9 (according to package.json) project installed via npm on linux in a project folder.
Command history as follows (after the npm install of Cordova, and installing the android SDK etc, and creating project folder):
cordova create . com.myproject MyProject
(all good I get a www dir which has config.xml, and the dummy hello cordova app, etc. This config.xml has the right name of my project etc generated in it by default)
cordova platform add android
(I get the platforms/android folder etc)
Now I install some plugins
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation.git
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device-orientation.git
This is fine, but also where things get interesting. I note that the plugin installation, as well as adding srcs to the plugins dir also updates my platforms/android/res/xml/config.xml with useful directives for Android like:
<feature name="Geolocation">
<param name="android-package" value="org.apache.cordova.GeoBroker" />
</feature>
<feature name="Compass">
<param name="android-package" value="org.apache.cordova.CompassListener" />
</feature>
It important to note that the config.xml in my www dir which I know is necessary to do a "cordova build" just never gets updated with any information related to the plugins I installed, which I am a little concerned about even/especially after reading:
http://docs.phonegap.com/en/3.0.0/config_ref_index.md.html#Configuration%20Reference.
I can sort of answer my own question here, but have some questions/concerns further down.
So logically the config.xml in the www dir, which is still non platform specific remains bland and uninteresting and only contains platform independendant directives. However I'm curious about it as the, platform independant one surely should still know about the plugins? Also the platform specific one (platforms/android/res/xml/config.xml), doesn't even know the name of my project, it's still called "Hello Cordova". This is also somewhat concerning.
So can someone tell me if everything is ok? Specifically:
- Does my platform independant config.xml need to know about the plugins I've installed? (is it a bug/TODO that the cli didn't do this?)
- Does my platform specific config.xml need to know the right name of my project/app? (again a bug/TODO here?)
- If the first two are not bugs, does cordova build process pull in each respective platform specific config.xml at some stage overiding or merging with the platform independant config.xml?
- Are there other differences I should be aware of between the two?
- Ultimately do I need to manually update www/config.xml (as well as the platform specific files) before I do a "cordova build", as the CLI isn't doing all it could/should?
Thanks in advance.