ios - 工作区警告 : Target Pods cannot link framework Foundation. 框架

标签 ios cocoapods xcode-workspace xcode9.4

构建工作区时抛出警告:

Target Pods - {AppName} product Pods_{AppName} cannot link framework Foundation.framework

Screenshot

这在更新到 Xcode 9.4 后开始。我将 CocoaPods 更新到最新版本 v1.5.3,但并没有解决警告。

最佳答案

这是由于在 Xcode 中使用了新的构建系统。该问题尚未在最新版本的 CocoaPods 中解决,截至撰写本文时为 v1.5.3。

现在,您可以通过将此 post_install 操作添加到您的 pod 文件来解决警告:

post_install do |installer|
    podsTargets = installer.pods_project.targets.find_all { |target| target.name.start_with?('Pods') }
    podsTargets.each do |target|
        target.frameworks_build_phase.clear
    end
end

更新 pod 文件后再次运行 pod install

来源:CocoaPods: Cannot link framework Xcode warning

关于ios - 工作区警告 : Target Pods cannot link framework Foundation. 框架,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50922311/

相关文章:

ios - WKWebView 获取cookie

ios - Firebase pod install - pod 'Firebase/Database' - 需要更高的最低部署目标

ios - 自动从依赖项目复制资源

具有多个项目的工作区中的 Xcode 构建配置

iphone - 在 UITableView 中延迟加载图像

iOS/swift/ Storyboard : Add PageViewController using only *part* of screen?

ios - 删除应用程序后的应用程序首选项

ios - Swift 项目中的 Swift Pod

ios - 为什么显示 "ld: framework not found Bolts"

xcode - 如何跨一个 Xcode 工作区的多个目标共享 Swift 类?