Take the 2-minute tour ×

Where do you store app configurations constants (not user preferences)?

  • store in Info.plist?
  • store in SomeOther.plist?
  • store as static (extern?) constant in a .h?
  • store as #define somewhere? (where?)


share|improve this question
@eman oh thanks! –  Henry Jul 23 '10 at 17:36
add comment

4 Answers

up vote 0 down vote accepted

If they don't have to be preserved after the application is being closed AppDelegate is fine. if they have to, then use NSUserDefaults class ;)

share|improve this answer
This isn't what the AppDelegate is for. –  Dermot Jul 22 '13 at 10:02
add comment

I store instance constants as a static in implementation class. Never had a global constant but I guess I would place it in the App delegate.

share|improve this answer
add comment

Save them in NSUserDefaults. Here is a good example:


share|improve this answer
NSUserDefaults is good for variable preferences, but overkill for constants. –  shosti Jul 23 '10 at 5:13
add comment

I do it in a very oldskool C way. I have just a file like Constants.h where I go

#define SOMETHING value

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

share|improve this answer
+1 for pretty cool and straight forward answer. –  Mahbubur R Aaman Nov 10 '13 at 13:11
add comment

Your Answer


