5

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.

stephen
  • 1,617
  • 3
  • 20
  • 27
  • I don't think the generated pods xcconfig file is the right place to make modifications. I'm struggling a similar problem: I need to preserve the build settings for the target (which imports a pod) which have been set originally by a hierarchical set of xcconfig files. Now, CocoapPods sets its own pod xcconfig - and there is virtually no way to find a viable solution to merge those settings properly. It appears to me, a fundamental requirement has been overlooked. – CouchDeveloper Sep 27 '13 at 11:16

2 Answers2

3

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.

Peter Hosey
  • 95,783
  • 15
  • 211
  • 370
stephen
  • 1,617
  • 3
  • 20
  • 27
1

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.

Kyle Fang
  • 1,139
  • 6
  • 14
  • 2
    No i mean i want to specifically override some build settings in the pods project. I know they generate settings already but is there anyway to override some of those settings? – stephen Sep 22 '13 at 10:20