cocoapods pods项目构建设置
因此,每次我们运行Pod更新时,pod项目都会重新生成。无论我们在pods项目中手动设置的任何构建设置都将重置。
So everytime we run a pod update, the pods project gets regenerated. Whatever build settings we manually set in the pods project is reset.
我想知道是否在Pod之后是否有必要为pods项目中的目标设置一些构建设置项目是由pod更新生成的?
I'm wondering if theres anyway to set some build settings of the targets in the pods project after the pod project is generated by a pod update?
任何帮助都值得赞赏。
经过数小时的可可脚怪和阅读文档之后,我想出了以下解决方案:
After a few hours of twiddling with cocoapods and reading documentation, I have come up with the following solution:
在您的podspec文件中,有一个选项可以指定要生成的xcconfig,请设置以下内容:
In your podspec file, there is an option to specify the xcconfig to be generated, set the following:
s.xcconfig = {'TEST_AFTER_BUILD' => 'YES', 'GCC_GENERATE_TEST_COVERAGE_FILES' => 'YES'}
在我的情况下,我需要从pods项目中生成coverage文件。
In my case i needed to generate coverage files from the pods project.
这将在pod更新后在xcconfig文件中生成,并因此包含在pods项目中。
This will in turn be generated in the xcconfig file after the pod update and hence be included in the pods project.