公司项目在执行 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.pbxprojcommand + F 搜索 OTHER_LDFLAGS ,删除搜索到的设置,command + S 保存,然后重新执行 pod install 或者 pod update

解决后:

 

作者:Jonzzs
链接:https://www.jianshu.com/p/dfb2a5834cd0

iOS 开发】解决使用 CocoaPods 执行 pod install 时出现 - Use the `$(inherited)` flag ... 警告的更多相关文章

  1. cocoapods 无法 升级 repo 无法执行pod install命令

    首先MAC自带了ruby,他是用rvm 管理的, 如果你用homebrew又安装了一个新版,很可能在升级cocoapods时遇到问题,明明自己用homebrew升级到最新版本了,页配置环境变量了,为什 ...

  2. 在执行 pip install 时遇到错误:python setup.py egg_info ...

    最近重新安装win10 64位专业版, 正好遇到python3.8发布,试了一下.结果jupyter都安装不了...心碎. ERROR: Command errored out with exit s ...

  3. IOS开发 CocoaPods 使用 pod Install 出现 Updating local specs repositories

    pod install 换成pod install --verbose --no-repo-update这个命令,前面的命令被墙了

  4. IOS开发之开篇--CocoaPods安装

    CocoaPods是什么?当你开发iOS应用时,会经常使用到很多第三方开源类库,比如JSONKit,AFNetWorking等等.可能某个类库又用到其他类库,所以要使用它,必须得另外下载其他类库,而其 ...

  5. 那些年一起用过的iOS开发利器之CocoaPods

    本系列所有工具的简介见:http://www.cnblogs.com/lloydsheng/p/3637606.html CocoaPods是一个负责管理iOS项目中第三方开源代码的工具.CocoaP ...

  6. iOS开发中使用CocoaPods来管理第三方的依赖程序

    之前也碰到类似的问题,怎样去管理这些第三方的文件,虽然手动添加也不算麻烦. 写这篇文章主要参考了唐巧的博文,链接如下: http://blog.devtang.com/blog/2012/12/02/ ...

  7. ios开发第三方库--cocoapods安装

    1. ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)&quo ...

  8. iOS开发 引用第三方库出现duplicate symbol时的处理方法

      该篇文章是我自己从我的新浪博客上摘抄过来的, 原文链接为: http://blog.sina.com.cn/s/blog_dcc636350102wat5.html     在iOS开发中, 难免 ...

  9. iOS开发——运行时OC篇&使用运行时获取系统的属性:使用自己的手势修改系统自带的手势

    使用运行时获取系统的属性:使用自己的手势修改系统自带的手势 有的时候我需要实现一个功能,但是没有想到很好的方法或者想到了方法只是那个方法实现起来太麻烦,一或者确实为了装逼,我们就会想到iOS开发中最牛 ...

随机推荐

  1. The Preliminary Contest for ICPC Asia Nanchang 2019 E. Magic Master

    题目:https://nanti.jisuanke.com/t/41352 思路:约瑟夫环 由题意得第k张牌即求 k 为 第几个 报数为m+1 的单位 用队列模拟即可 #include<bits ...

  2. mysql数据库之 存储引擎、事务、视图、触发器、存储过程、函数、流程控制、数据库备份

    目录 一.存储引擎 1.什么是存储引擎? 2.mysql支持的存储引擎 3. 使用存储引擎 二.事务 三.视图 1.什么是视图 2.为什么要用视图 3.如何用视图 四.触发器 为何要用触发器 创建触发 ...

  3. GridControl的列DisplayFormat自定义方法

    定义格式化的类: public class EnableFormat : IFormatProvider, ICustomFormatter { public object GetFormat(Typ ...

  4. PyCharm控制台输出乱码

    IDE Encoding设置为GBK后,在运行程序,中文就显示正常了 据说是因为ide编码不能设置为utf-8,需要设置为gdb,因为这个控制台的代码需要和windows保持一致. 另外还有一个问题就 ...

  5. python 创建实例对象

    实例化类其他编程语言中一般用关键字 new,但是在 Python 中并没有这个关键字,类的实例化类似函数调用方式. 以下使用类的名称 Employee 来实例化,并通过 __init__ 方法接收参数 ...

  6. datetime模块的常用总结

    datetime模块 datetime模块提供了一些处理日期和时间的标准库.常用的有 datetime timedelta timezone 构造一个datetime对象 datetime() dat ...

  7. sh_03_列表的数据统计

    sh_03_列表的数据统计 name_list = ["张三", "李四", "王五", "王小二", "张三 ...

  8. pip安装源和虚拟环境的搭建

    一.pip安装源 1.介绍 采用国内源,加速下载模块的速度 常用pip源: 豆瓣:https://pypi.douban.com/simple 阿里:https://mirrors.aliyun.co ...

  9. Jmeter(二) Jmeter组件介绍

    一.测试计划 测试的起点,同时也是其他所有组件的容器 二.线程(用户) Setup 线程组:一种特殊类型的线程,可用于执行预测试操作.即执行测试前进行定期线程组的执行 Teardown 线程组:一种特 ...

  10. Selenium 环境安装

    前言: 本人在学习Selenium时,用的版本是Python3.6+Selenium3,后续写的所有学习资料都是基于这套环境.在安装Selenium3前,请确保本机已安装好了Python3,如未安装可 ...