Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cocoapods pods project build settings

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.

like image 901
stephen Avatar asked Oct 03 '22 21:10

stephen


1 Answers

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.

like image 150
stephen Avatar answered Oct 05 '22 09:10

stephen