-1

I've just upgraded to 11.5. Compiler is now throwing out warnings (var -> let) for IOS Charts. Is it possible to remove these only for the Charts module i.e. I don't want to remove warnings for the rest of my own code (I'm reluctant to go into the Charts module and change the source, even though the changes are trivial).

enter image description here

Jim Burke
  • 251
  • 3
  • 14

1 Answers1

2

Go the Target's Build Settings and set Inhibit All Warnings to YES.

OR

If you're using cocoapods you can automatically set it to YES by adding these lines into your 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

OR

Just declare inhibit_all_warnings! in top of your Podfile.

If you want to disable / enable warnings for specific pods use :inhibit_warnings => true or :inhibit_warnings => false in the pod line. Then you should execute 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 Inhibit All Warnings Documentation

emrcftci
  • 3,355
  • 3
  • 21
  • 35
  • Thanks, that works, I used your feedback to edit the podfile which I found under the Pods project in the Xcode Project Navigator. I appreciate your help. – Jim Burke May 28 '20 at 11:46