I\'ve got the following in my .h file:
#ifndef _BALANCE_NOTIFICATION
#define _BALANCE NOTIFICATION
const NSString *BalanceUpdateNotification
#endif
>
Apple has a recommendation in their own documentation, where among other things, the macro APPKIT_EXTERN is used instead of extern. Combined with the contents of a default header file when created in Xcode, this is a complete implementation:
Constants.h:
#import
#ifndef Constants_h
#define Constants_h
APPKIT_EXTERN NSString *MyConstantName;
#endif
Constants.m:
#import "Constants.h"
NSString *MyConstantName = @"MyConstantValue";
I think the above is more or less the standard way to achieve string constants, according to Apple.