iOS 警告消除(记录贴)

记录接手的项目优化遇到的警告信息和处理方式

1、清除一些需要忽略的警告

Targets -> Build Settings (选择All,搜索custom)-> Apple Clang - Custom Compiler Flags -> Other Warning Flags.

填入要忽略的警告类型
右键警告点击 Reveal in Log 查看报警类型
例如: -Wdocumentation,填入内容为 -Wno-documentation,在W后面添加"no-"。

参考:忽略xcode的警告方法

2、Pod中的第三方库指定编译目标不在Xcode范围内

The iOS deployment target ‘IPHONEOS_DEPLOYMENT_TARGET’ is set to 6.0, but the range of supported deployment target versions is 8.0 to 13.6.99.

将下述内容添加在PodFile的最下方,重新执行Pod install。

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '8.0'
        end
    end
end

参考:iOS小记–warning: The iOS deployment target is set to

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值