xcodebuild - 如何定义预处理器宏? [英] xcodebuild - how to define preprocessor macro?
问题描述
如何在使用xcodebuild时定义预处理器宏?
How can I define a preprocessor macro when using xcodebuild?
我需要使用一堆不同的配置构建我的应用程序,我想这样做一个shell脚本,它使用不同的预处理器宏多次运行xcodebuild。
I need to build my app using a bunch of different configurations, and I would like to do this using a shell script which runs xcodebuild a number of times with different preprocessor macros.
推荐答案
Cmd + I在项目中打开Info对话。然后在Build选项卡中,找到Preprocessor Macros设置。 在那里添加宏。
Cmd + I on the project to open the Info dialog. Then in the "Build" tab, find the "Preprocessor Macros" setting. Add the macros there.
...在哪里可以找到设置名称 GCC_PREPROCESSOR_DEFINITIONS
,所以你可以添加
... Where you can find the setting name is GCC_PREPROCESSOR_DEFINITIONS
, so you could add
GCC_PREPROCESSOR_DEFINITIONS="foo=bar"
到xcodebuild参数。
to the xcodebuild arguments.
这篇关于xcodebuild - 如何定义预处理器宏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!