In Objective-C
it was sometimes useful to use static string constants to define alternate API keys (for example to differentiate between RELEASE and DEBUG keys for analytics packages, like MixPanel, Flurry or Crashlytics):
#if DEBUG
static NSString *const API_KEY = @"KEY_A";
#else
static NSString *const API_KEY = @"KEY_B";
#endif
and then...
[Analytics startSession:API_KEY];
How does this translate to Swift, since the Swift compiler no longer uses a preprocessor?