GCC_PREPROCESSOR_DEFINITIONS = FOO=My Value
It is particularly important to check that the definition of your value exists here, as it will not cause a compilation failure, but instead result in the generation of @"FOO"
.
@import Foundation;
#include <os/base.h>
#ifdef FOO
NSString* const MyConstant = @OS_STRINGIFY(FOO);
#else
#error Undefined
#endif
@import Foundation;
extern NSString* const MyConstant;
print("value: ", MyConstant)