Titanium JIRA Archive
Appcelerator Community (AC)

[AC-4769] Expose Bundle ID and more to Titanium.App namespace

GitHub Issuen/a
TypeImprovement
Priorityn/a
StatusResolved
ResolutionInvalid
Resolution Date2017-02-02T14:26:43.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsn/a
ReporterCreative
AssigneeShak Hossain
Created2017-02-02T09:47:08.000+0000
Updated2017-02-02T14:26:43.000+0000

Description

Currently, the Titanium.App namespace holds various settings regarding to tiapp.xml. However, it does not include the bundle ID of your app (i.e. "com.appcelerator.app", which can be found under the "" tag in tiapp.xml) and possibly more settings. I suggest a generic approach: perhaps a new namespace should be created that uses https://www.npmjs.com/package/xml2js or something similar, to parse the tiapp.xml to an in-app readable JSON-format (lets call the new namespace "Titanium.TiApp"). This would expose anything that the developer might need and it will work for any future additions to tiapp.xml. Then, Titanium.App will only contain values that are not explicitly in tiapp.xml, like: idleTimerDisabled, keyboardVisible, disableNetworkActivityIndicator (see http://docs.appcelerator.com/platform/latest/#!/api/Titanium.App). All other settings that can be found in the "Titanium.TiApp" namespace should then be deprecated in Titanium.App.

Comments

  1. Hans Knöchel 2017-02-02

    http://docs.appcelerator.com/platform/latest/#!/api/Titanium.App-method-getId
  2. Creative 2017-02-02

    oh i see, my bad. I was looking for "bundle" keywords but couldnt find any. Please close the report, thanks :)
  3. Hans Knöchel 2017-02-02

    All good! For next time: All root-keys are mapped to generic getters (same for url, etc). And for properties, you can access them using Ti.App.Properties.

JSON Source