[TIMOB-17015] TiAPI: add runtime directives to distinguish between ad-hoc and app-store distribution
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 3.2.3 |
Fix Version/s | n/a |
Components | TiAPI |
Labels | cb-tooling |
Reporter | Fokke Zandbergen |
Assignee | Unknown |
Created | 2014-05-19T07:03:36.000+0000 |
Updated | 2018-02-28T20:03:11.000+0000 |
Description
With ALOY-680 resolved on compile-time for Alloy 1.4.0, I'd like to see something similar for the Titanium API as well so I don't have to switch out keys and code when building for the stores, with all risks of forgetting something. For a use case: https://github.com/jeffbonnes/installr-updater/issues/1.
What it should look like:
var key;
if (Ti.App.distributionType === Ti.App.DIST_STORE) {
key = 'myKeyOnlyWorkingInStores';
} else if (Ti.App.distributionType === Ti.App.DIST_ADHOC) {
key = 'myKeyForAdHocBuildsToTesters';
} else {
key = 'myKeyForLocalTesting';
}
Moving this ticket to engineering for further evaluation. I think it should be a compile time directive instead of runtime directive but I would let the team decide.