CocoaPods: the $(inherited) flag

Edit: the blog has moved! Check this article here.


 

I’ve done it a lot of times by now, but I keep forgetting it. So here’s a quick post to commit it to memory!

If we have a project with the Tests target it can happen that after running pod install we get this messagge:

[!] The target `MyProjectTests [Debug]` overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Pods-MyProjectTests.xcconfig'.
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.

How can we “use the $(inherited) flag”? Where should we add it?

The $(inherited) flag is an flag we can pass to the linker and that does some magic…. I haven’t been able to find a proper explanation for how $(inherited) works, although it’s easy to guess from the name.

Being a linker flag we can add it in our target Build Settings > Other Linker Flags section.

Screen Shot 2013-07-10 at 00.16.36

That’s all. I feel better now that I’ve put this piece of memory in the external storage of my brain that is the internet. And I hope it may help someone else too.

About mokagio

I'm a mobile infrastructure engineer at Automattic. When I'm not playing with my kids or working, I like reading and writing, both software and words. Currently writing a book on Test-Driven Development.

2 responses to “CocoaPods: the $(inherited) flag

  1. thanks very much … i have the same problem with u

  2. Yvon

    Thank you, it was usefull!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: