Hello Magnus,
I don't think you can set different content tags for development/production builds directly in config.xml.
I would guess hooks are a way to do what you want. Cordova hooks are scripts that run during the build and makes it possible to configure things during build. For example, you could have the setting:
in config.xml, and then make a hook to copy the development or production version to the target platform www directory. For development, the index.html file could contain a script with something like:
Code: Select all
location.assign("http://192.168.1.69:4042")
For production it would be the "real" index.html.
Here is an article that describes how to do this:
http://devgirl.org/2013/11/12/three-hoo ... ect-needs/The technique outlined in the above post is based on setting and environment variable to detect development or production builds. Here is an example adopted from the post:
Documentation about hooks:
http://cordova.apache.org/docs/en/edge/ ... ex.md.htmlAnother blog post:
http://intown.biz/2014/05/13/build-conf ... ing-hooks/I guess there are other ways to configure the build, like custom scripts (written in Ruby, Node.js, whatever) that patches the config.xml file before starting the cordova build.
Personally, I just edit the config.xml file when using a custom Cordova app with Evothings Workbench, for my needs that is the easiest and quickest approach. But I use hooks for other things, have found them useful.
I find it very useful to hook up a custom Cordova app to Evothings Workbench, use this a lot when developing apps. You can even make a small UI in you app, if you want, that allows entering the address to the workbench. This technique is for example used in the Estimote Cordova plugin example app, see these files:
https://github.com/evothings/phonegap-e ... x.html#L85https://github.com/evothings/phonegap-e ... lopment.jsHope the above helps! Let us know how it goes and please post further questions/discussions.
Best regards, Mikael