{ "id": "130604", "key": "TIMOB-17015", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2014-05-19T07:03:36.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "cb-tooling" ], "versions": [ { "id": "15971", "description": "Release 3.2.3", "name": "Release 3.2.3", "archived": false, "released": true, "releaseDate": "2014-04-30" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:11.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "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.\r\n\r\nWhat it should look like:\r\n\r\n{code:javascript}\r\nvar key;\r\nif (Ti.App.distributionType === Ti.App.DIST_STORE) {\r\n key = 'myKeyOnlyWorkingInStores';\r\n} else if (Ti.App.distributionType === Ti.App.DIST_ADHOC) {\r\n key = 'myKeyForAdHocBuildsToTesters';\r\n} else {\r\n key = 'myKeyForLocalTesting';\r\n}\r\n{code}", "attachment": [], "flagged": false, "summary": "TiAPI: add runtime directives to distinguish between ad-hoc and app-store distribution", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "current", "comment": { "comments": [ { "id": "306032", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "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.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-22T04:43:32.000+0000", "updated": "2014-05-22T04:43:32.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }