Cocoapods 1.1.1 target overrides `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES`

I updated cocoapods 1.1.1 for my Xcode 8 Swift 2.0 project and now I get the warning "... target overrides ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES ..." in the console. How can i fix this?

Here is my podfile

 platform :ios, '9.0' use_frameworks! def app_pods pod 'Alamofire', '~> 4.0.0' pod 'AlamofireObjectMapper','~> 4.0.0' pod 'RealmSwift', '~> 2.0.2' pod 'KeychainAccess', '~> 3.0.0' pod 'ReachabilitySwift', '~> 3' pod 'SwiftyBeaver', '~> 1.0.1' pod 'GoogleAnalytics', '~> 3.17.0' end def unit_tests app_pods pod 'OHHTTPStubs', '~> 5.2.1' pod 'OHHTTPStubs/Swift', '~> 5.2.1' end target 'Demo' do app_pods end target 'App1' do app_pods end target 'App2' do app_pods end target 'DemoTests' do unit_tests end target 'App1Tests' do unit_tests end target 'App2Tests' do unit_tests end post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['SWIFT_VERSION'] = '3.0' end end end 
+6
source share
3 answers

I was able to fix this problem by following these steps:

  • Go to Build Settings
  • At the top, select All and Combined
  • In the "Build Options" section, you should see Always embed standard Swift libraries , and it is highlighted in bold.
  • Click on it and click "Delete." Now it should be revealed.
  • Substitute installation and errors / errors should disappear!

This will not allow me to post the image because I do not have enough reputation, so here is a detailed link to the screenshot!

https://cloud.githubusercontent.com/assets/17066507/21532583/93df897e-cd1f-11e6-9f17-d25cb81a2a53.png

+9
source

This problem was fixed in the following tensile request https://github.com/CocoaPods/CocoaPods/pull/6068 , and it should be absent in cocoapods versions 1.1.2. I got information from the following github issue https://github.com/CocoaPods/CocoaPods/issues/6067

0
source

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/

0
source

Source: https://habr.com/ru/post/1258630/


All Articles