Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable warnings in Xcode from frameworks

I have imported the three20 project into my project, and when I upgraded to Xcode 4.2 with iOS 5, a bunch of warnings appeared in the project.

I don't care about them, but they make a lot of noise, and it's easy to miss any real warnings in my project now. Is there a way to disable warnings for those specific libraries?

like image 909
Micah Hainline Avatar asked Nov 03 '11 15:11

Micah Hainline


People also ask

How do I turn off warnings in Xcode?

If you want to disable all warnings, you can pass the -suppress-warnings flag (or turn on "Suppress Warnings" under "Swift Compiler - Warning Policies" in Xcode build settings).

How do I turn off compiler warnings?

Turn off the warning for a project in Visual StudioSelect the Configuration Properties > C/C++ > Advanced property page. Edit the Disable Specific Warnings property to add 4996 . Choose OK to apply your changes.


1 Answers

  1. If your third-party libraries are added as a separate target, you can check Inhibit all warnings for that specific target to turn all warnings off.

  2. If your library is added as plain source files to your current target, you can set -w compiler flag for individual sources to mute all warnings in them. You have to go to Build phases menu of your target configuration and set this flag for each source file in Compile Sources section by double clicking on each file end entering -w flag. enter image description here

like image 181
iHunter Avatar answered Sep 20 '22 16:09

iHunter