Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Don't Display Warnings From CocoaPods Pods

When building my project I have a lot of warnings from CocoaPods Pods. So other projects that I don't have control of.

What is the suggested way to handle this? I'd prefer to have Xcode only display warnings related to my project. It just gets to be too much if it displays warnings related to projects I don't have control over.

like image 956
Charlie Fish Avatar asked May 17 '17 20:05

Charlie Fish


People also ask

How do you hide the pods warnings?

You can search for "inhibit_all_warnings" in your Xcode build settings of the PodBundle in your project-workspace. Set the value to "YES" and it will hide all your Pod file warnings. If you do it to your workspace it will hide all your project warnings also.

How do I hide warnings in Xcode?

Select your project and select your target and show Build Phases . Search the name of the file in which you want to hide, and you should see it listed in the Compile Sources phase. Double-click in the Compiler Flags column for that file and enter -w to turn off all warnings for that file. Hope it will help you.

What is pods XcodeProj?

XcodeProj is a library written in Swift for parsing and working with Xcode projects.


1 Answers

There is two way to get it done:

Method 1

  1. Go to your pod project's Build Settings tab
  2. Search for inhibit_all_warnings flag
  3. Set it to YES

It'll suppress all the warning related to the pod project. But when you do next pod install the flag will be reset to NO.

Inhibit all warning

Method 2

In your podfile specify inhibit_all_warnings! key like following: (This will avoid the inhibit warning flag resetting with each pod install issue. Do a pod install after adding this flag.).

platform :ios, '9.0'
inhibit_all_warnings!

target 'MyApp' do
   # Your Pods
end

Reference: Podfile Syntax

like image 81
Midhun MP Avatar answered Sep 28 '22 02:09

Midhun MP