xcodebuild - how to define preprocessor macro?

前端 未结 2 604
眼角桃花
眼角桃花 2020-12-13 19:30

How can I define a preprocessor macro when using xcodebuild?

I need to build my app using a bunch of different configurations, and I would like to do this using a sh

2条回答
  •  温柔的废话
    2020-12-13 20:24

    Cmd + I on the project to open the Info dialog. Then in the "Build" tab, find the "Preprocessor Macros" setting. Add the macros there.

    ... Where you can find the setting name is GCC_PREPROCESSOR_DEFINITIONS, so you could add

    GCC_PREPROCESSOR_DEFINITIONS="foo=bar"
    

    to the xcodebuild arguments.

提交回复
热议问题