简体   繁体   中英

Built-in preprocessor token to detect iPhone app target

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 above 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM