cocoapods pods project build settings

十年热恋 提交于 2019-12-10 17:39:39

问题


So everytime we run a pod update, the pods project gets regenerated. Whatever build settings we manually set in the pods project is reset.

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?

Any help is appreciated.


回答1:


After a few hours of twiddling with cocoapods and reading documentation, I have come up with the following solution:

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'}

In my case i needed to generate coverage files from the pods project.

This will in turn be generated in the xcconfig file after the pod update and hence be included in the pods project.




回答2:


Pod is design to automatically set those build settings so that you don't have to,

If you are talking about the build setting in your own project, normally cocoaPods will not touch those settings.



来源:https://stackoverflow.com/questions/18942517/cocoapods-pods-project-build-settings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!