In my Objective-C projects I often use a global constants file to store things like notification names and keys for NSUserDefaults
. It looks something like this:
@interface GlobalConstants : NSObject
extern NSString *someNotification;
@end
@implementation GlobalConstants
NSString *someNotification = @"aaaaNotification";
@end
How do I do exactly the same thing in Swift?