当前位置:  开发笔记 > IOS > 正文

什么是CocoaPods,Swift 3和Xcode 8的ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES

如何解决《什么是CocoaPods,Swift3和Xcode8的ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES》经验,为你挑选了4个好方法。

安装cocoapods并添加pod "SwiftCarousel"到pod文件并取消注释平台之后:ios,'9.0'我得到了这个错误

ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES

我该怎么办?

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

Fogmeister.. 93

在构建设置中转到此处...

在此输入图像描述

然后突出显示"Always embed ..."行并点击删除.这将改变它以使用继承的属性.



1> Fogmeister..:

在构建设置中转到此处...

在此输入图像描述

然后突出显示"Always embed ..."行并点击删除.这将改变它以使用继承的属性.


它将保留在那里,但它可能会从粗体文本变为普通文本.如果发生了这种变化,那么它就会被继承.普通文本=继承.粗体文字=被覆盖.

2> Marlon Ruiz..:

我能够通过执行以下操作来解决此问题(一步一步):

    转到构建设置

    在顶部选择全部和组合

    在Build Options下,您应该看到Always Embed Swift标准库,它是粗体.

    单击它并单击删除(< - ).它现在应该是不受约束的.(普通文本=继承)

    Pod安装和错误/错误应该消失!

在此输入图像描述


为我工作,对于仍然出现错误的所有人员,请确保也对Targets OS和UITests执行此操作!

3> 小智..:

    转到构建设置

    在顶部选择全部和合并

    在“生成选项”下搜索“始终嵌入Swift标准库”

    用$(继承)更新其值

    现在安装pod,所有错误都应该消除。



4> Vaiden..:

公认的解决方案有效,但是现在您必须确保所有队友都在执行它pod install

我们都知道他们不会。

通过将其添加到您的底部,可以使CococaPods自动执行此操作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

此处提供更多信息:https : //www.devsbedevin.net/cocoapods-always-embed-swift-standard-libraries/

推荐阅读
mobiledu2402851377
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有