I'm looking for a nice way to set my configuration constants. My idea was to create a singleton with my config properties. Say mySingletonConf with: URL, USERID, PASSWORD. During the initialization of the sharedInstance, a configuration file should be read to set the properties in mySingletonConf.
- Should I use properties for this type of constants? I take they should be class-level properties?
- Is it possible to set the configuration dynamically? I. e. by reading all Setter-Methods of mySingletonConf, then searching the loaded configuration (.plist-Dictionary) for the key == property name and then invoke the settter with the value?
It would be nice to have the things set dynamically, in case new constants are needed. Then I would just have to create new properties and adjust the configuration files. Am I on the right track? Thanks for any help!