swift - CocoaPods 更新目标覆盖 `FRAMEWORK_SEARCH_PATHS`

标签 swift cocoapods

我在我的 iOS 应用程序中使用 CocoaPods 一年了。 昨天我尝试更新 pod update 我的项目中包含的所有 pod。

但是当使用这个命令时,我总是得到以下错误:

[!] The `XXXTests [Debug]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-XXXTests/Pods-XXXTests.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `XXX [Release]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-XXXTests/Pods-XXXTests.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

根据 this answer我已将 FRAMEWORK_SEARCH_PATHS 更改为 $(inherited) 但它不会产生任何影响。 enter image description here

谁能帮我解决这个问题?

编辑 1:这是我的 pod 文件的内容:

    # Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'xxx' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for xxx
  pod 'Firebase'
  pod 'Firebase/Core'
  pod 'Firebase/Crash'
  pod 'Firebase/RemoteConfig'


  target 'xxxTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

最佳答案

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

target 'xxx' do
  # Comment this line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!
  pod 'Firebase'
  pod 'Firebase/Core'
  pod 'Firebase/Crash'
  pod 'Firebase/RemoteConfig'
  # Pods for xxx

   target 'xxxTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

关于swift - CocoaPods 更新目标覆盖 `FRAMEWORK_SEARCH_PATHS`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40945581/

相关文章:

ios - 对 xml_****_**** 的引用不明确

Flutter:CocoaPods 找不到 pod "Firebase/Messaging"的兼容版本

swift - 无法使用 Swift 在 xcode UI 测试中使用 Alamofire

ios - `pod repo update`到底是做什么的?

xcode - 我想使用 '1.1.0' 的版本 `Alamofire-SwiftyJSON`

ios - 一组三个 UILabel 中的一个不会更新文本

ios - 如何确保相同的继承层次结构,例如对于 MVVM

json - 读取 JSON "not an object"

swift - Swift 中的 JSON 解析

Swift TableView 单元格不显示