开发者

Built-in preprocessor token to detect iPhone app target

开发者 https://www.devze.com 2023-01-19 13:19 出处:网络
I need to set up correctly the FIRM ID for my app(according to target).For example I wrote in my Distribution.h the following lines:

I need to set up correctly the FIRM ID for my app(according to target).For example I wrote in my Distribution.h the following lines:

#define X_FIRM_ID @"X"
#define XX_FIRM_ID @"XX"

#define FIRM_ID XX_FIRM_ID

For each build that I made I must manually change the FIRM_ID.I want to this automatically, just like I do for Default.png and other images used in my apps. I have 2 targets: one for X and another one for XX.In each target I filled the Preprocessor macros with X and XX accordingly.

Now I want to define in Distribution.h the FIRM_ID accordingly with the preprocessor macro and I don't know how to do this.

#define FIRM_ID if defined(XX) XX

The abo开发者_开发技巧ve one do not work.

Please help me with this, if it can be done.


There are several ways to do this, here are two:

  • In your target info, under build, set Preprocessor macros
  • Import different Prefix headers for the two targets
0

精彩评论

暂无评论...
验证码 换一张
取 消