Errors after upgrading to Xcode 8: "There is no such module" and "target overrides the parameter" EMBEDDED_CONTENT_CONTAINS_SWIFT`build "

I get a No such module for Pods when I try to build a project. If I delete the code waiting for this Pod, another β€œNo such module” is suitable for the other Pod, which means that each Pod must be affected. When I type pod install , I get the following messages:

 [!] The X target overrides the `EMBEDDED_CONTENT_CONTAINS_SWIFT` build setting defined in `X'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. [!] The `X` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `X'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. 

I get each of them both for debugging and for releasing versions of my application and two tests, so there are only 12 messages.

I set Always Embed Swift Standard Libraries and EMBEDDED_CONTENT_CONTAINS_SWIFT to NO and YES in my build settings, and did nothing. I also added the following code to my subfile, and it didn't work either:

 post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'NO' end end end 
+66
ios xcode swift xcode8 cocoapods
Sep 19 '16 at 9:30
source share
5 answers
 [!] The `X` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `X'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. 

Today I ran into this problem. I decided it

  • Go to Project / Targets β†’ [Project Name] β†’ Build Settings.
  • search "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES"
  • right-click Debug and select "Other", enter "$ (inherited)"
  • do the same with "Release" and set your pod

You can follow the image below.




enter image description here

+143
Sep 25 '16 at 12:11
source share
β€” -

Errors that you see when starting pod install should not cause No such module errors. Therefore, I assume that these errors are not related.




To get rid of pod install errors:

This is because you define a flag in the build settings that overrides the value set by CocoaPods. It does not matter whether you set the value to YES or NO , it will still overwrite the parameter from CocoaPods.

To fix this:

  • Go to Project / Targets β†’ [Project Name] β†’ Build Settings.
  • Find and click on the appropriate setting (you can use the search box in the upper right corner).
  • Click Backspace to remove the setting.

You should see a setting from bold to regular font. This means that the parameter has been removed and uses the default value instead.

Repeat for each flag giving you an error and run pod install to make sure it works.




Causes of No such module errors:

There are several ways this error can occur. Have you looked through these answers to see if your case is applicable to your case? If you report this, it will be easier to help.

  • Xcode: "No such module" error, but infrastructure exists
  • "no such module" on Xcode 7 beta 2
+20
Sep 23 '16 at 10:17
source share

(Updated as of October 10, 2017)

  • Projects / Goals β†’ Project Name β†’ Build Settings
  • Build options
  • Click Always Embed Standard Swift Libraries to make it highlighted.
  • Press the delete button on the keyboard.

Always Embed Swift Standard libraries should no longer be Bold , and you will no longer receive this warning when performing module updates or installing pod =)

+5
Jun 01 '17 at 0:47
source share

Here is what I worked for me:

 pod deintegrate || rm -rf Pods pod install --verbose rm -rf ~/Library/Developer/Xcode/DerivedData 

Then I just clean the project and build it again.

+3
Oct 02 '16 at 0:01
source share

when I import SDWebImage into my project for the second time, he wore this FLAnimatedImage module was not found, and when I install the package, it warns "... ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES ... - use the $(inherited) flag, or - remove the configuration assembly from the target " Finally, I find a way that completely removes SD, especially in finder, in pods products and removes the project in the simulator, and then imports SD again.

-2
Feb 16 '17 at 6:09
source share



All Articles