I am a little confused as to when it\'s best to use:
static NSString *AppQuitGracefullyKey = @\"AppQuitGracefully\";
instead of
See "static const" vs "#define" vs "enum". The main advantage of static
is type safety.
Other than that, the #define
approach introduces a flexibility of inline string concatenation which cannot be done with static variables, e.g.
#define ROOT_PATH @"/System/Library/Frameworks"
[[NSBundle bundleWithPath:ROOT_PATH@"/UIKit.framework"] load];
but this is probably not a good style :).