在iOS开发中,我们经常会用到cocoapods来管理三方库,但是有些三方库里面会有很多警告,让人用着舒服,但是看着不爽。特别是如果有的要求严格的,不允许出现警告的开发团队,更要消除警告,但是我们用到了cocoapods管理三方库,又不能随意的更改源码,因为这个版本改了,可能当你执行pod update
的时候,三方库会更新到最新或指定版本,会覆盖项目中当前已经被修改过源码的库,徒增烦恼。如果你遇见了这种问题,那么可以尝试在Podfile
里面添加inhibit_all_warnings!
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
# inhibit_all_warnings! 也可以加在这里
target 'projectName' do
inhibit_all_warnings!
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for projectName
# UI
pod 'SDWebImage', '4.3.2'
target 'projectNameTests' do
inherit! :search_paths
# Pods for testing
end
target 'projectNameUITests' do
inherit! :search_paths
# Pods for testing
end
end