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开发中最牛 ...
随机推荐
- C++ 编码导致编译错误
记录一个问题 平时经常用Notepad++写C++,然后g++编译 最近出现一个莫名其妙的问题 原来是编译时遇到了非法字符 用Notepad++一看,原来文件的编码出现的变化 不是UTF-8或者其他对 ...
- 更新protobuf
sudo pip install --upgrade protobuf sudo apt-get install libprotobuf-dev protobuf-compiler这个不知道是什么问题 ...
- thinkPHP5.0.22初体验---request相关用法
如果浏览器要返回美观排列的json数据,可以安装火狐浏览器的插件 返回XML的数据格式 渲染模板的用法 return $this->fetch('index/index2')效果 扒掉stirp ...
- Win10 搭建IIS服务
IIS服务器,俗称:Web服务器又或者叫做网站服务器. IIS详解: https://baike.baidu.com/item/iis/99720?fr=aladdin 开始搭建: 1. 打开控制面板 ...
- Python 3标准库 第十四章 应用构建模块
Python 3标准库 The Python3 Standard Library by Example -----------------------------------------第十四章 ...
- css设置元素垂直居中的几个方法
最近有人问我怎么设置元素垂直居中?我....(这么基础的东西都不会?我有点说不出话来), 不过还是耐心的教了他几个方法,好吧教完他们,顺便把这些方法整理一下 第一种:通过设置成为表格元素的方式来实现 ...
- 定时任务spring task
1)spring boot 几种定时任务的实现方式:https://www.jianshu.com/p/b6809b5a0c26 2)spring-boot 定时任务之Scheduled Task:h ...
- ar9331修改flash大小和df、cat /proc/mtd的区别
首先感谢黄工的指导. 在openwrt固件目录下target/linux/ar71xx/image/Makefile,找到对应的机型,修改为4M,8M,16M,32M. 以oolite机型为例,如图所 ...
- JavaWeb-SpringBoot_使用MySQL数据库实现用户管理_demo
使用Gradle编译项目 传送门 项目已托管到Github上 传送门 SpringBoot使用MySQL实现 实现功能:普通用户注册.普通用户登录.管理员通过edit-user页面和show-all- ...
- Android_(菜单)选项菜单
Android系统中菜单分为Options Menu.Context Menu.Sub Men三种 Options Menu和Context Menu属于一级菜单 Sub Menu属于Options ...