代码改变世界

Preprocessor Macros区分target

2018-11-21 15:17  法子  阅读(339)  评论(0编辑  收藏  举报

原文:https://blog.csdn.net/apple_app/article/details/38663367

给不同的target的Build Settings->Preprocessor Macros里添加不同的宏,

然后

#ifdef MYAPP

static NSString *AppSting = @"myapp";

#elif MYAPP_L

static NSString *AppSting = @"myapp_l";

#endif