
CocoaPods
公司项目在执行
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。
方法就是这样,希望我的方法能够解决你的问题。
将来的你,一定会感激现在拼命的自己,愿自己与读者的开发之路无限美好。