Cocoapods: ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES Inherited creates project validation issues

Created on 30 Sep 2016  路  13Comments  路  Source: CocoaPods/CocoaPods

What did you do?

Running pod install gives the following warnings:

[!] The `<project name> [Release]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `<.xcconfig location>'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

If you manually set the project setting to $(inherited) or remove the setting then xcode will ask you to update the project to recommended settings.

What did you expect to happen?

Is there a way to silence this warning if Xcode requires the setting to be YES in certain cases?

What happened instead?

Every time I run pod install/update I see the same warning.

CocoaPods Environment

Stack

   CocoaPods : 1.1.0.rc.2
        Ruby : ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
    RubyGems : 2.5.1
        Host : Mac OS X 10.12 (16A319)
       Xcode : 8.0 (8A218a)
         Git : git version 2.8.4 (Apple Git-73)
Ruby lib dir : /Users/luke/.rbenv/versions/2.3.1/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 0bc2638d6e7f807e304464a2f79f9ef64b4cff7c

Installation Source

Executable Path: /Users/luke/.rbenv/versions/2.3.1/bin/pod

Plugins

cocoapods-deintegrate : 1.0.1
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.0.0
cocoapods-try         : 1.1.0

Most helpful comment

I was able to fix this problem by doing the following:

  1. Go into Build Settings
  2. At the top select All and Combined
  3. Under Build Options you should see Always Embed Swift Standard Libraries and it is bold.
  4. Click on it and click delete. It should now be unbolded.
  5. Pod install and the error/errors should go away!
    screen shot 2016-12-28 at 4 56 09 pm

All 13 comments

You should remove those settings from your targets that CocoaPods integrates, since CocoaPods sets them for you.

It'll set them appropriately based on whether or not the target its integrating contains Swift and/or the pods its integrating contain Swift.

Deleting the options does not seem to work. Xcode wants to set them explicitly and will show this as a warning every time. Also, EMBEDDED_CONTENT_CONTAINS_SWIFT is now obsolete in Xcode 8 (swift 3 only?).

In Xcode 8 it's deprecated for 2.3 and 3. Hm. Try deleting the settings, quitting Xcode, pod installing, and then starting Xcode?

Just to update, the fix is being worked on in #5933.

The fix here was merged in #5933/#6016 and will be available in an upcoming release. Thanks for filing!

I was able to fix this problem by doing the following:

  1. Go into Build Settings
  2. At the top select All and Combined
  3. Under Build Options you should see Always Embed Swift Standard Libraries and it is bold.
  4. Click on it and click delete. It should now be unbolded.
  5. Pod install and the error/errors should go away!
    screen shot 2016-12-28 at 4 56 09 pm

This worked for me

screen shot 2017-01-08 at 6 02 54 pm

_...then_

screen shot 2017-01-08 at 6 03 04 pm

_...then_

screen shot 2017-01-08 at 6 03 12 pm

_...then_

screen shot 2017-01-08 at 6 03 18 pm

Cleared and green:

Pod installation complete! There is 1 dependency from the Podfile and 2 total pods installed.

I tried clearing the error via terminal but no go, the CocoaPods app is way friendlier at adding pods and reporting errors.

when I import SDWebImage in my project second time,It worn that Module FLAnimatedImage not found,and when I pod install ,it warn "... ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES ... - Use the $(inherited) flag, or - Remove the build settings from the target."
At last, I find the way that remove the SD completely,specialy in the finder ,in the pods' products,and delete the project in the simulator , then import SD again.

Helped

I was getting below errors:
[!] ThemyApp [Debug]target overrides the `LD_RUNPATH_SEARCH_PATHS build setting defined in Pods/Target Support Files/Pods-myApp/Pods-myApp.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the$(inherited)` flag, or
- Remove the build settings from the target.

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

what worked for me - based on error messages above, I figured some Run Path/Search path build setting of my app overriding the Pods build setting. Went to xcode, and made below changes to my app's build settings

1

2

from Xcode top menu, Product -> Clean

And pod install again now worked with no error:
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.

@b-tiwari great!! It worked for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

soleares picture soleares  路  3Comments

dawnnnnn picture dawnnnnn  路  3Comments

pallaviMN picture pallaviMN  路  3Comments

pronebird picture pronebird  路  3Comments

Mingmingmew picture Mingmingmew  路  3Comments