Maintaining AndroidManifest.xml in Git


#1

As everything in platform/ directory is gitignored and we’re told to update platforms/android/AndroidManifest.xml for some things such as versioning for Google Play store (http://ionicframework.com/docs/guide/publishing.html) i wondered what the best practice is for maintaining settings between multiple developers and machines on a project?

I tried to bodge inserting stuff in to the manifest using a hook, but my string replacement goes bad as the Android Manifest is never rebuilt from scratch each time so my hook is adding the same thing in over and over again. doh!


#2

That guide is wrong on that point. You don’t need to specify an Android version code because Cordova will automatically generate one for you based on the version set in config.xml. You can also explicitly specify an Android version code in config.xml if you prefer. Either way, no need to edit AndroidManifest.xml directly.

See https://cordova.apache.org/docs/en/4.0.0/config_ref_index.md.html#additional-versioning


#3

There’s already an open issue for this inaccuracy in the guide: https://github.com/driftyco/ionic-site/issues/264