使用Xcode 11.5的IOS Chart编译器警告[重复]。

问题描述 投票:1回答:1

我刚刚升级到11.5。 编译器现在为IOS Charts抛出警告(var -> let)。 是否可以只为图表模块删除这些警告,即我不想为我自己的代码的其余部分删除警告(我不愿意进入图表模块并更改源码,即使更改是微不足道的)。

enter image description here

swift xcode11 ios-charts
1个回答
2
投票

去目标的 Build Settings 并设置 Inhibit All WarningsYES.

如果你使用的是椰树荚,你可以自动将其设置为 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

Cocoapods 抑制所有警告文档

© www.soinside.com 2019 - 2024. All rights reserved.