记录接手的项目优化遇到的警告信息和处理方式
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