[AC-4769] Expose Bundle ID and more to Titanium.App namespace
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | n/a |
Status | Resolved |
Resolution | Invalid |
Resolution Date | 2017-02-02T14:26:43.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | n/a |
Reporter | Creative |
Assignee | Shak Hossain |
Created | 2017-02-02T09:47:08.000+0000 |
Updated | 2017-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.
http://docs.appcelerator.com/platform/latest/#!/api/Titanium.App-method-getId
oh i see, my bad. I was looking for "bundle" keywords but couldnt find any. Please close the report, thanks :)
All good! For next time: All root-keys are mapped to generic getters (same for
url
, etc). And for properties, you can access them usingTi.App.Properties
.