target会覆盖FRAMEWORK_SEARCH_PATHS构建设置

时间:2014-10-18 23:54:40

标签: objective-c cocoapods

我想问一下然后回答这个问题。

我想更新内置到我的应用中的CocoaPods,所以我从终端运行了pod install

当我收到此错误时:

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

你如何使用$(继承)标志?

3 个答案:

答案 0 :(得分:100)

选择项目,目标 - >应用程序,然后Build Settings我添加了$(继承)行,删除之前引用的任何特定pod:

enter image description here

我希望这有助于某人。

答案 1 :(得分:13)

我也遇到过这个问题。

除了做上面提到的Peter之外,请记得仔细检查您的podfile中是否选择了正确的Xcode项目。这是因为您可能正在更改不正确的Xcode项目的Build Settings。这是一个愚蠢的错误,但在我意识到它之前花了很长时间。

通常,如果目录中只有一个pod install文件,.xcodeproj会自动运行。但是,如果要迁移项目以开始使用cocoapods从旧的方式手动将框架/第三方项目添加到Xcode项目中,则可能在文件夹中有多个.xcodeproj文件。执行上述修复并没有为我解决,因为我正在编辑不正确的.xcodeproj文件。

转到项目目录,检查名为Podfile的文件,并确保指定xcodeproj

# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift

use_frameworks!
xcodeproj 'APP_NAME.xcodeproj'
target 'APP_NAME' do

# Your dependencies here
# pod 'NAME_OF_DEPENDENCY'
pod 'Google/CloudMessaging'
pod 'RxSwift',    '~> 2.0'
pod 'RxCocoa',    '~> 2.0'
pod 'RxBlocking', '~> 2.0'
pod 'Fabric'
pod 'Crashlytics'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'

在Podfile上选择正确的.xcodeproj后,转到Xcode并执行以下操作:

  1. 从左侧的Project Navigator中,选择您的项目。
  2. 在中心屏幕上,转到Build Settings
  3. 为“框架搜索路径”'
  4. 添加过滤器
  5. 输入$(inherited)作为值;它应该自动填充评估该表达式的数据
  6. 下面是版本7.2(7C68)的Xcode图像。

    Xcode preview

答案 2 :(得分:0)

我有一个$(继承)但是递归的,只需将其更改为非递归

项目目标->构建设置-> framework_search_path

enter image description here

相关问题