App global settings
Is there a way to use Root.plist to write/read application settings and have them included in "iphone main settings" like the other applications?
tnx
Luca
5 Answers
-
For information about the Root.plist file, here is some information: http://iphoneincubator.com/blog/tutorial/how-to-create-an-iphone-preferences-file
The file that Chris was referring to is properties.js, located in the Examples folder. The appearance of the Settings pane seem a bit flakey in the sim. The upside is you can use the getter and setters to store bits of information without the need to write to a database.
-
You can get the values from the settings like this:
var setting = Ti.App.Properties.getBool('setting_name', true);
-
Hi Luca,
Coincidentally just a few minutes ago I discovered that the 'Kitchen Sink' app has a page in the settings in my Simulator (totally missed it), so there's probably code in there showing how to do that.
cheers,
Chris. -
I saw Kitchen Sink properties and I found Root.plist that contains them but a don't find any reference in the app. It seems to be not used
-
Hi there,
Your right. I'd assume that settings are accessible from Titanium Mobile Javascript. I couldn't find docs on this or a page in Kitchen Sink where settings were 'retrieved'.
There's not a huge bonus in having a settings page that you can't access at runtime, so I'm assuming it's just that the info on how to do that hasn't been published yet.
cheers,
Chris.