What's ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES with CocoaPods, Swift 3 and Xcode 8

前端 未结 6 655
隐瞒了意图╮
隐瞒了意图╮ 2020-12-08 01:49

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

ALWAYS

相关标签:
6条回答
  • 2020-12-08 02:06
    1. Go to Build Settings
    2. At the top select All and Combined
    3. Under Build Options search "Always Embed Swift Standard Libraries"
    4. Update its value with $(inherited)
    5. Now install pod and all the error should go.

    0 讨论(0)
  • 2020-12-08 02:06
    1. Delete your Pods folder
    2. set the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to $(inherited);
    3. run pod install
    0 讨论(0)
  • 2020-12-08 02:22

    The accepted solution works, but now you have to make sure all of your teammates are performing it each pod install.

    And we all know they won't.

    You could make CococaPods do it automatically, by adding this to the bottom of your 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 info here: https://www.devsbedevin.net/cocoapods-always-embed-swift-standard-libraries/

    0 讨论(0)
  • 2020-12-08 02:27

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

    1. Go to 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. (Normal text = inherit)
    5. Pod install and the error/errors should go away!

    0 讨论(0)
  • 2020-12-08 02:29

    I suggest to set all pods after install as suggested 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
    
    0 讨论(0)
  • 2020-12-08 02:30

    Go here in your build settings...

    And then highlight the "Always embed..." row and hit delete. This will change it to use the inherited property.

    Even after you make this change it will remain there but it will probably change from bold to normal text. If that change happens then it is inherited.

    Normal text = inherited.

    Bold text = overridden.

    0 讨论(0)
提交回复
热议问题