Last Updated: September 09, 2019
·
17.56K
· supermarin

Inhibit warnings in Cocoapods

Since Cocoapods 0.18, it's possible to inhibit warnings (turn them off) in Xcode for each specific pod.

Before, you were able to inhibit all of them at once, using:

platform :ios
  pod 'ObjectiveSugar'

inhibit_all_warnings!

One issue was that analyzer warnings weren't inhibited together with compiler warnings.

Now you can do it for each pod. Let's assume you have 2 pods that aren't throwing any warnings, and one that does:

platform :ios
  pod 'ObjectiveSugar'
  pod 'Objective-Record'

  pod 'TapkuLibrary'  # this one throws warnings

In order to inhibit just for 'TapkuLibrary', you can do it using this syntax:

pod 'TapkuLibrary', :inhibit_warnings => true

You can still use inhibit_all_warnings!, and from 0.18 it will inhibit the analyzer warnings as well.

2 Responses
Add your response

Is it possible to inhibit warnings also from implicit dependencies? That is, one pod is dependent on another which I want to inhibit warnings on.

over 1 year ago ·

@testower You can include that specific dependency in your Podfile above the original pod, and inhibit_warnings: true on that specific dependency.

over 1 year ago ·