Where to store constants in iphone application?

Where are application configuration constants (not user settings) stored?

  • save to Info.plist?
  • save to SomeOther.plist?
  • store as static constant (extern?) in .h?
  • store as #define somewhere? (Where?)

Thank.

+3
source share
4 answers

If they should not be saved after closing the AppDelegate application. if they need, then use the NSUserDefaults class;)

0
source

I do it the old way. I only have a file like Constants.h where I go

#define SOMETHING value

And then I just # include "Constants.h" in my code and use SOMETHING.

+4
source

. , , .

0

Source: https://habr.com/ru/post/1756108/


All Articles