xcode 为什么 Cocoapods 在构建设置中抱怨嵌入的内容包含 swift 设置?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/34445636/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 08:21:03  来源:igfitidea点击:

Why is Cocoapods complaining about the embedded content contains swift setting in the build settings?

xcodeswiftcocoapods

提问by Wojtek Dmyszewicz

I recently added swift files to my test target (combined with older cocoa touch classes).

我最近将 swift 文件添加到我的测试目标(与旧的可可触摸类相结合)。

Why is cocoapods complaining about the embedded content contains swift setting in the build settings?

为什么 cocoapods 在构建设置中抱怨嵌入的内容包含 swift 设置?

[!] The YOURP-PROJECT-Tests [Debug] target overrides the EMBEDDED_CONTENT_CONTAINS_SWIFT build setting defined in Pods/Target Support Files/Pods-YOUR-PROJECT-Tests/Pods-YOUR-PROJECT-Tests.debug.xcconfig. This can lead to problems with the CocoaPods installation

[!] YOURP-PROJECT-Tests [Debug] 目标会覆盖 Pods/Target Support Files/Pods-YOUR-PROJECT-Tests/Pods-YOUR-PROJECT-Tests.debug.xcconfig 中定义的 EMBEDDED_CONTENT_CONTAINS_SWIFT 构建设置。这可能会导致 CocoaPods 安装出现问题

回答by Wojtek Dmyszewicz

I needed to add the $(inherited) flag to the build setting

我需要将 $(inherited) 标志添加到构建设置中

enter image description here

在此处输入图片说明

回答by ManuCiao

If you replace YES with "$(inherited)" it will fix the issue in the project/target EMBEDDED_CONTENT_CONTAINS_SWIFT value. After you click Enter it will show a "YES". Run the pod install again and the issue should disappear.

如果您将 YES 替换为“$(inherited)”,它将解决项目/目标 EMBEDDED_CONTENT_CONTAINS_SWIFT 值中的问题。单击 Enter 后,它将显示“是”。再次运行 pod install,问题应该会消失。