Appcelerator Dynamic Config

36 Views Asked by At

I'm building an app using the latest tools from Appcelerator. I have a dynamic variable that I want to reference via the Alloy.CFG global variable. To do this, I added the variable to the config.json file for the corresponding environments, however I cannot get the app to read this variable. For example, I tried adding the --env flag to the appc run command, but that does not work.

Furthermore I cannot find a way to add new environments. I want to add a "qa" environment, however when I add that to the config.json file and use appc run --env=qa it gives me an error saying unknown environment named 'qa'. How can I add more environments and how do I get the appc run command to read the variables for the specific configuration???

1

There are 1 best solutions below

0
Amrut On

In config json u will have to mention some thing like this

"env:development" : {
}, 
"env:test" : {
}