【发布时间】:2016-09-19 09:30:23
【问题描述】:
当我尝试构建项目时,我收到了用于 Pod 的 No such module。如果我删除期望这个 Pod 的代码,另一个 Pod 会出现另一个“没有这样的模块”,这意味着每个 Pod 都必须受到影响。当我输入 pod install 时,我收到以下消息:
[!] The X target overrides the `EMBEDDED_CONTENT_CONTAINS_SWIFT` build setting defined in `X’. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `X` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `X'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
我的应用程序的调试版本和发布版本以及两个测试都获得了这些信息,因此总共有 12 条消息。
我已在我的构建设置中将Always Embed Swift Standard Libraries 和EMBEDDED_CONTENT_CONTAINS_SWIFT 设置为NO 和YES,但这没有任何作用。我还在我的 Podfile 中添加了以下代码,但它也不起作用:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'NO'
end
end
end
【问题讨论】:
-
使用 CocoaPods 建议的
$(inherited)标志
标签: ios swift xcode cocoapods xcode8