pod三方库之后 三方库有警告,爆红,版本不一致的问题

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
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容