Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17015] TiAPI: add runtime directives to distinguish between ad-hoc and app-store distribution

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.2.3
Fix Version/sn/a
ComponentsTiAPI
Labelscb-tooling
ReporterFokke Zandbergen
AssigneeUnknown
Created2014-05-19T07:03:36.000+0000
Updated2018-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';
}

Comments

  1. Ritu Agrawal 2014-05-22

    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.

JSON Source