79

I've been running into a couple of strange errors in terminal when updating cocoapods after updating a Switf2 project to Swift3. Here are the errors:

[!] The `MyShowGuide [Debug]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-MyShowGuide/Pods-MyShowGuide.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `MyShowGuide [Release]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-MyShowGuide/Pods-MyShowGuide.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

So far I've tried numerous ways to try and remedy the issue including deleting derived data and running pod deintegrate/ pod install. I also added $(inherited) to the Other Linker Flags and Header Search Paths but still get the error.

SwiftyJD
  • 5,257
  • 7
  • 41
  • 92
  • 5
    Do exactly what it suggests. Go into the Build Settings for "Framework Search Paths" and change the value for your target to be "$(inherited)". Why are you messing with "Other Linker Flags" and "Header Search Paths"? (You probably want $(DEVELOPER_FRAMEWORKS_DIR) in there as well as $(inherited)) – Tibrogargan Nov 14 '16 at 23:22
  • Thanks that worked, in plain sight. – SwiftyJD Nov 14 '16 at 23:30
  • There is no menu called "Framework Search path". Can you check if the answer needs to be updated in case of new versions? – Nasenbaer Apr 22 '20 at 18:50

6 Answers6

142
  1. Target - > building settings- >ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES, Value type is Boolean, click on the other, change the value to $(inherited)
  2. perform - pod update
  3. Done
Tatsuyuki Ishi
  • 3,883
  • 3
  • 29
  • 41
Tim
  • 1,528
  • 1
  • 11
  • 8
20

This worked for me:

https://github.com/CocoaPods/CocoaPods/issues/5981#issuecomment-363591574

  1. Go to Build Settings
  2. Search for "Runpath Search Paths".
  3. Double click the value field and add $(inherited)
  4. Product -> Clean Build Folder

Run the cocoapods command in the terminal and things should go fine this time.

thechargedneutron
  • 802
  • 1
  • 9
  • 24
  • 1
    This is the only thing that worked. I also had to add to the Header Search Paths. Then clean and pod install again – jdog Mar 25 '20 at 22:48
5
  1. Target - > build settings- > BuildOptions-> Validate Build Product, Here the Debug value type is Boolean, Click here to change the value No to YES

  2. Perform - Build Clean

  3. Done

manu george
  • 59
  • 1
  • 1
  • The correct answer is in the comment by @Tibrogargan in the comment below the question. I am not sure how your proposed solution would fix the issue. – Gene Z. Ragan Sep 02 '19 at 17:40
1

I'm new to iOS development, but the only thing that worked for me - is adding $(inherited) to the Linker Flags as described here https://mokacoding.com/blog/cocoapods-the-inherited-flag/

P.S. The iOS project was originally created from React Native template.

Build Settings > Other Linker Flags section.

Oleksandr
  • 3,761
  • 8
  • 50
  • 80
0

In my case i had deleted literary search path while solving another error so i just clicked debug and pasted $(inherited) the i clicked release and again pasted $(inherited) you can probably do the same for other fields and this is what is being told in the error message as well i.e use the $(inherited) flag After this just do pod update

Ole Pannier
  • 3,208
  • 9
  • 22
  • 33
0

For me, the accepted answer didn't fully work. I had to add $(inherited) to the Project itself and both build tests.

enter image description here

In short, just click all 3 places where the red arrows are pointing, and follow the same directions.

Building Settings > All > in the search box enter ALWAYS EMBED SWIFT STANDARD LIBRARIES > click on the NO > click Other... in the box that opens paste $(inherited) then press the return key.

You have to do this 3x total. One for each place where the red arrows are pointing.

Lance Samaria
  • 17,576
  • 18
  • 108
  • 256