iOS 开发】解决使用 CocoaPods 执行 pod install 时出现 - Use the `$(inherited)` flag ... 警告
公司项目在执行
pod install的时候总是出现很多黄色的警告,因为是警告并不会影响项目的正常编译,一直没有在意,但是总是有很多警告看起来很不舒服,于是就花了点时间解决掉了,下面将解决方法记录下来分享给有同样问题的你们。
警告信息
产生此警告的原因是项目 Target 中的一些设置,CocoaPods 也做了默认的设置,如果两个设置结果不一致,就会造成问题,显示的警告信息如下:
[!] The `client_ios_fm_a [Debug]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-client_ios_fm_a/Pods-client_ios_fm_a.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `client_ios_fm_a [Debug]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-client_ios_fm_a/Pods-client_ios_fm_a.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `client_ios_fm_a [Debug]` target overrides the `OTHER_CFLAGS` build setting defined in `Pods/Target Support Files/Pods-client_ios_fm_a/Pods-client_ios_fm_a.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `client_ios_fm_a [Debug]` target overrides the `HEADER_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-client_ios_fm_a/Pods-client_ios_fm_a.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `client_ios_fm_a [Release]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-client_ios_fm_a/Pods-client_ios_fm_a.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `client_ios_fm_a [Release]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-client_ios_fm_a/Pods-client_ios_fm_a.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `client_ios_fm_a [Release]` target overrides the `OTHER_CFLAGS` build setting defined in `Pods/Target Support Files/Pods-client_ios_fm_a/Pods-client_ios_fm_a.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `client_ios_fm_a [Release]` target overrides the `HEADER_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-client_ios_fm_a/Pods-client_ios_fm_a.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.

解决方法
打开项目
Target-Build Settings,搜索Other Linker Flags,在这个设置上加入$(inherited)。打开项目
Target-Build Settings,依次搜索如下图所示的警告上提示的设置名称,将这些设置选项全部改为$(inherited),或者选中这些设置按下delete键恢复原设置。

如果有
FRAMEWORK_SEARCH_PATHS这个设置的警告的话,最好先把当前的设置项记录下来,然后选中设置按下delete以后,再把之前的设置加进去,否则编译可能会出现很多报错。然后重新执行
pod install或者pod update就会发现警告消失了。如果我的方法不能够解决你的问题的话,可以试一下网上的另一种方法,就是点击项目文件
project.xcodeproj,右键显示包内容,用文本编辑器打开project.pbxproj,command + F搜索OTHER_LDFLAGS,删除搜索到的设置,command + S保存,然后重新执行pod install或者pod update。
解决后:

作者:Jonzzs
链接:https://www.jianshu.com/p/dfb2a5834cd0
iOS 开发】解决使用 CocoaPods 执行 pod install 时出现 - Use the `$(inherited)` flag ... 警告的更多相关文章
- cocoapods 无法 升级 repo 无法执行pod install命令
首先MAC自带了ruby,他是用rvm 管理的, 如果你用homebrew又安装了一个新版,很可能在升级cocoapods时遇到问题,明明自己用homebrew升级到最新版本了,页配置环境变量了,为什 ...
- 在执行 pip install 时遇到错误:python setup.py egg_info ...
最近重新安装win10 64位专业版, 正好遇到python3.8发布,试了一下.结果jupyter都安装不了...心碎. ERROR: Command errored out with exit s ...
- IOS开发 CocoaPods 使用 pod Install 出现 Updating local specs repositories
pod install 换成pod install --verbose --no-repo-update这个命令,前面的命令被墙了
- IOS开发之开篇--CocoaPods安装
CocoaPods是什么?当你开发iOS应用时,会经常使用到很多第三方开源类库,比如JSONKit,AFNetWorking等等.可能某个类库又用到其他类库,所以要使用它,必须得另外下载其他类库,而其 ...
- 那些年一起用过的iOS开发利器之CocoaPods
本系列所有工具的简介见:http://www.cnblogs.com/lloydsheng/p/3637606.html CocoaPods是一个负责管理iOS项目中第三方开源代码的工具.CocoaP ...
- iOS开发中使用CocoaPods来管理第三方的依赖程序
之前也碰到类似的问题,怎样去管理这些第三方的文件,虽然手动添加也不算麻烦. 写这篇文章主要参考了唐巧的博文,链接如下: http://blog.devtang.com/blog/2012/12/02/ ...
- ios开发第三方库--cocoapods安装
1. ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)&quo ...
- iOS开发 引用第三方库出现duplicate symbol时的处理方法
该篇文章是我自己从我的新浪博客上摘抄过来的, 原文链接为: http://blog.sina.com.cn/s/blog_dcc636350102wat5.html 在iOS开发中, 难免 ...
- iOS开发——运行时OC篇&使用运行时获取系统的属性:使用自己的手势修改系统自带的手势
使用运行时获取系统的属性:使用自己的手势修改系统自带的手势 有的时候我需要实现一个功能,但是没有想到很好的方法或者想到了方法只是那个方法实现起来太麻烦,一或者确实为了装逼,我们就会想到iOS开发中最牛 ...
随机推荐
- solaris启动脚本S33installramdisk
脚本内容: state="$1" case "$state" in 'start') echo 'Starting install mr ramdisk' &g ...
- linux ngxtop安装安装及使用
写在前面: ngxtop是Nginx日志实时分析利器 1.下载 下载地址:https://github.com/lebinh/ngxtop 下载zip文件到本地 登录linux服务器,定位到安装目录 ...
- 使用ajax向服务端发送Form中的数据
前端代码: <form action="" id="myFormUpdate"> <p>宠物名称: <input type=&qu ...
- “==”与equals方法
“==”操作符 基本类型比较值:判断两个变量的值相等. 引用类型比较引用(是否指向同一个对象):只有指向同一个对象时才相等. 用“==”进行比较时,两边的数据类型必须兼容(可自动转换的基本数据类型除外 ...
- SQL中Charindex和Oracle中对应的函数Instr
转:http://blog.csdn.net/zhuyu19911016520/article/details/8568640 sql :charindex('字符串',字段)>0 charin ...
- jquery visible 选择器 语法
jquery visible 选择器 语法 作用::visible 选择器选取每个当前是可见的元素.除以下几种情况之外的元素即是可见元素:设置为 display:none type="h ...
- Protocol Buffers 开发者指南
欢迎来到 protocol buffers 的开发者指南.protocol buffers 是一个语言中立,平台中立针对通讯协议,数据存储和其他领域中对结构化数据进行序列化的扩展方法. 本文档主要针对 ...
- python中assert的用法
assert:断言 格式: assert 表达式 [, 参数] 当表达式为真时,程序继续往下执行: 当表达式为假时,抛出AssertionError错误,并将 参数 输出 举例: def foo( ...
- FLASH和EEPROM的区别
FLASH和EEPROM的最大区别是FLASH按扇区操作,EEPROM则按字节操作,二者寻址方法不同,存储单元的结构也不同,FLASH的电路结构较简单,同样容量占芯片面积较小,成本自然比EEPROM低 ...
- AcWing:105. 七夕祭(前缀和 + 中位数 + 分治 + 贪心)
七夕节因牛郎织女的传说而被扣上了「情人节」的帽子. 于是TYVJ今年举办了一次线下七夕祭. Vani同学今年成功邀请到了cl同学陪他来共度七夕,于是他们决定去TYVJ七夕祭游玩. TYVJ七夕祭和11 ...