TiShadow
TiShadow copied to clipboard
Appified builds to device are "dev" rather than "test" builds
Using either:
ti build -p android -T device --shadow
ti build -p ios -T device --shadow
I get dev builds, meaning that "env:development"
values from my config.json are used instead of "env:test". Device builds should be test.
≫ tishadow --version
2.8.1
why?
By normal Alloy rules, a regular build to simulator/emulator is a dev build. A build to device is a test build. We have different endpoints in the config.json file for the two types of builds. If I use one of the commands above to create an appified install on a device, I get my dev settings. I have to remember to temporarily modify my config.json file to account for this. Since Android appified builds can take many minutes, forgetting to modify the config.json first leads to a big waste of time on a "bad" compile. Furthermore, I have frequently committed the modified config.json file to GitHub (which can be corrected of course, but creates confusion for our other dev who checks out the project not knowing the config.json was modified).
It would be great if TiShadow honored the -T
/ --target
flag
gotcha - ts just does a simple alloy compile before appifying. I'll have a look.
I think this also causes my issue I saw today: if I test for ENV_PRODUCTION in my code, the tishadow build will crash, because this variable doesn't exist. If I use ENV_DEV everything is okay.