Created
December 4, 2012 04:06
-
-
Save phatblat/4200484 to your computer and use it in GitHub Desktop.
Convert Xcode build setting to runtime ObjC string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Pass Xcode build-time CONFIGURATION variable to runtime as an Objective-C string | |
#define QUOTE(name) #name | |
#define STR(macro) QUOTE(macro) | |
#define CONFIG_NAME_CSTR STR(CONFIGURATION) | |
#define CONFIG_NAME [NSString stringWithCString:CONFIG_NAME_CSTR encoding:NSUTF8StringEncoding] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment