xocde8以后,第三方库多了很多警告,虽然不影响编译,但是一些不必要的警告多了的话,可能会影响看到真正需要的警告条目。
对于使用cocoapod引入的第三方,我们可以在podfile文件中 增加一句 inhibit_all_warnings! 来要pod的工程不显示任何警告
target 'xxx' do
inhibit_all_warnings!
pod 'xxx'
inhibit_warnings参数能够有效的抑制CocoaPods引入的第三方代码库产生的warning,但是有时候会产生意想不到的错误,最好是在只针对出现警告的库
pod 'xxxx', :inhibit_warnings => true
object file was built for newer iOS version (x.x) than being linked (x.x)
修改Deployment Target或者在Build Settings -> other lingkr Flags 中添加-w 就可以解决了
注释里面报的警告
Build Settings -> documentation comments改成NO
解决 cocoapod统一版本
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.5'
end
end
end
解决 cocoapod文件报红
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'No'
end
end
end