0

In IOS Objective C Projects i am using following way to Hide warnings. please check attached screenshot. But Swift based project its not working. Is there any possible to hide warnings? ObjectiveC Project

rmaddy
  • 314,917
  • 42
  • 532
  • 579
PREMKUMAR
  • 8,283
  • 8
  • 28
  • 51
  • 7
    Don't hide warnings, fix them. – rmaddy May 05 '16 at 17:14
  • 2
    Keep in mind that most warnings will lead to unexpected bugs or crashes. And getting into the habit of ignoring truly benign warnings will lead you to ignoring important warnings that really must be fixed. Personally, I turn on the setting to treat warnings as errors. I have a project will 250,000 lines of code (not a typo) and it compiles with 0 (none, nada, zilch, zero) warnings. – rmaddy May 05 '16 at 17:23
  • While I agree you should fix and not silence, your question was about silencing. Take a look at [this](http://stackoverflow.com/a/32884509/3487310) and see if it helps. – fsb May 05 '16 at 17:36
  • @rmaddy : +1 to that. Good old `clang -Wall -Weverything -Werror` for the Hard Mode achievement. – rickster May 06 '16 at 04:52

1 Answers1

-1

Select your target and show Build Phases. Then enter the name of the file in the search box, 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.

Akash KR
  • 778
  • 3
  • 11