Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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

— asked March 20th 2010 by Gianluca Ungaro
  • iphone
  • main
  • parameters
  • root.plist
  • settings
0 Comments

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.

    — answered March 23rd 2010 by Chris Griffith
    permalink
    1 Comment
    • You should create the followind directories in your project's folder:

      modules
          iphone
              Settings.bundle
                  en.lproj
                      Root.strings  // file
                  Root.plist // the file created via the previous guide
      

      Then everything should go automagically :)

      — commented August 18th 2011 by Kristof Gruber
  • You can get the values from the settings like this:

    var setting = Ti.App.Properties.getBool('setting_name', true);
    
    — answered August 18th 2011 by Kristof Gruber
    permalink
    0 Comments
  • 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.

    — answered March 21st 2010 by Chris Reed
    permalink
    0 Comments
  • 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

    — answered March 21st 2010 by Gianluca Ungaro
    permalink
    0 Comments
  • 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.

    — answered March 22nd 2010 by Chris Reed
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.