cocoapods怎么添加预编译宏

我想针对每个target设置不同的宏, 比如debug版本, 那么X=0, release版本X=1
怎么在Podfile里设置这些属性呢?
谢谢

阅读 10.9k
2 个回答

https://github.com/CocoaPods/CocoaPod...
去git问了个问题,得到回到了看来目前没有简单的方法支持.
At the moment there is no a convenient way backed by CocoaPods as the prefix headers of the targets are generated from scratch after every installation. There are two work arounds:

Create one header file for your target and after an installation add the import to the prefix headers created by CocoaPods.
Write a post install hook in the podfile which adds your macros to the prefix header of each target (docs).
This feature is discussed in #833.

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题