我刚刚升级到11.5。 编译器现在为IOS Charts抛出警告(var -> let)。 是否可以只为图表模块删除这些警告,即我不想为我自己的代码的其余部分删除警告(我不愿意进入图表模块并更改源码,即使更改是微不足道的)。
去目标的 Build Settings
并设置 Inhibit All Warnings
到 YES
.
或
如果你使用的是椰树荚,你可以自动将其设置为 YES
在您的 Podfile
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'] = "YES"
end
end
end
或
只要声明 inhibit_all_warnings!
顶着 Podfile
.
如果您想为特定的豆荚禁用启用警告,请使用 :inhibit_warnings => true
或 :inhibit_warnings => false
中的 pod 行。然后你应该执行 pod install
platform :ios
# ignore all warnings from all pods
inhibit_all_warnings!
# ignore warnings from a specific pod
pod 'Charts', :inhibit_warnings => true