To add automatically incrementing build number into your Titanium app. So if you test it on multiple devices you always know, what exact version is installed where.
- Save the
build_version.sh
in your Titanium project folder (same location as tiapp.xml). - From terminal
chmod +x build_version.sh
to make it executable. - Add the property line from
tiapp.xml
to your tiapp.xml - Whenever you want to increase build numer - execute
build_version.sh
script (I have it in my build scripts, so it automatically updates on every build).
You can read the build number in your controllers using: Ti.App.Properties.getInt('build');
Tip: I am adding it on the home screen of my app while testing, and into settings.bundle while beta testing on different devices.