What ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES with CocoaPods, Swift 3 and Xcode 8

after installing cocoapods and adding the pod "SwiftCarousel" to the pod file and uncommenting the platform: ios, '9.0' I got this ERROR

ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES

what am I supposed to do?

 mohammed.elias$ pod install Analyzing dependencies Downloading dependencies Installing SwiftCarousel (0.8.0) Generating Pods project Integrating client project [!] Please close any current Xcode sessions and use 'scrollView.xcworkspace' for this project from now on. Sending stats Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed. [!] The 'scrollViewTests [Debug]' target overrides the 'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' build setting defined in 'Pods/Target Support Files/Pods-scrollViewTests/Pods-scrollViewTests.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the '$(inherited)' flag, or - Remove the build settings from the target. [!] The 'scrollViewTests [Release]' target overrides the 'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' build setting defined in 'Pods/Target Support Files/Pods-scrollViewTests/Pods-scrollViewTests.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the '$(inherited)' flag, or - Remove the build settings from the target. [!] The 'scrollViewUITests [Debug]' target overrides the 'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' build setting defined in 'Pods/Target Support Files/Pods-scrollViewUITests/Pods-scrollViewUITests.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the '$(inherited)' flag, or - Remove the build settings from the target. [!] The 'scrollViewUITests [Release]' target overrides the 'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' build setting defined in 'Pods/Target Support Files/Pods-scrollViewUITests/Pods-scrollViewUITests.release.xcconfig'. This can lead to problems with the CocoaPods installation 
+43
ios swift3 xcode8 cocoapods
source share
5 answers

Go here in the build settings ...

enter image description here

Then select the line "Always insert ..." and press "Delete". This will change it to use the inherited property.

+92
source share

I was able to solve this problem by doing the following (step by step):

  1. Go to build settings
  2. At the top, select All and Combined.
  3. In the "Assembly Options" section, you should see "Always Embed Swift Standard Libraries", they are in bold.
  4. Click on it and click on "Delete" (<-). Now it should be printed. (Plain text = inherit)
  5. Under installation and errors / errors should go away!

enter image description here

+26
source share
  1. Go to build settings
  2. At the top, select All and Combined
  3. In the "Build Options" section, find "Always insert standard Swift libraries"
  4. Update its value with $ (inherited)
  5. Now install the module and all errors should disappear.

enter image description here

+6
source share

The solution worked, but now you need to make sure that all your teammates run it every pod install .

And we all know that they will not.

You can force CococaPods to do this automatically by adding this to the bottom of the Podfile :

 post_install do |installer_representation| installer_representation.pods_project.targets.each do |target| target.build_configurations.each do |config| if config.name == 'MyPOD' config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'Yes' end end end end 

More information here: https://www.devsbedevin.net/cocoapods-always-embed-swift-standard-libraries/

+4
source share

I suggest installing all modules after installation, as indicated in the message:

 post_install do |installer_representation| installer_representation.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = '$(inherited)' end end end 
+2
source share

All Articles