[TIMOB-18909] Expose build and named version via Ti.App
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | None |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Android, iOS |
| Labels | cb-tooling |
| Reporter | Fokke Zandbergen |
| Assignee | Unknown |
| Created | 2015-05-15T14:45:54.000+0000 |
| Updated | 2019-10-02T06:22:10.000+0000 |
Description
Currently, we set Ti.App.version to the version-tag of the
tiapp.xml file:
https://github.com/appcelerator/titanium_mobile/blob/35c0034605a800f5a6241d602a58d744222b2e1a/iphone/cli/commands/_build.js#L2816
For Android you can already set the versionName and versionCode directly and once TIMOB-17993 is resolved so can you for iOS's CFBundleShortVersionString and CFBundleVersion. If you set these, then Ti.App.version may not be the actual release version, affecting our own analytics - which uses this value - as well.
Suggestions:
* Let android:versionName and CFBundleShortVersionString override <version> Ti.App.version
* Let android:versionCode and CFBundleVersion override <build> for Ti.App.build once TIMOB-19173 is resolved
Is there an alternative for this on recent Ti releases?