I have to create two apps for two companies. The icon / splash screen etc. is different for both apps to give a custom look. However internally both apps work in the same way. Data is retrieved from server depending on the company id.
No problem. I will solve my problem it in a different way.
Search the forum, I already asked this question and got a good answer using git sub modules.
You could also solve most of these requirements by using a more powerful build process than the basic one provided with ionic starter apps. I use Generator-M-Ionic which is able to change values in your config.xml, generate constants per environment and more.
The technique I use in my gulp.js file is I can define environment specific values in JSON files which are then written into config.js (by a gulp task).
For instance you can have config-dev.json and config-prod.json, with different values for your ‘companyId’ constant.
This works with the gulp-ng-constant and gulp-extend modules.
Probably not as sophisticated as what Generator-M does but fairly easy to add to your gulp file.
Well while it is possible, it’s not really the intended purpose of the config.xml.
This is for cordova specific features and information. Plugins, webview preferences, icons/splashscreens. Not the actual implementation of your app.
A better option would be to define a const.js file and store all that information in there. This way, you can change that when you need to.