6

I avoid getting warnings in my swift code. However when it comes to storyboard requirements it's a bit harder for me.

So for now i just want to disable xcode showing warnings regarding storyboard issues.

I have tried the following without success:

enter image description here

Dorad
  • 3,413
  • 2
  • 44
  • 71

2 Answers2

5

Disable show warnings option

As you have mentioned the option Show warnings under Interface Builder Storyboard Compiler -Options must be kept no, for suppressing warnings related to your storyboard.

What you missing to do

Also after that you can enable and disable this option from right bottom position of warnings tab in Issue navigator.

Example:

enter image description here

That way you can toggle easily.

Saranjith
  • 11,242
  • 5
  • 69
  • 122
2

If you just want to hide warnings for storyboard, it looks like you've done it correctly. However, you do need to restart Xcode for the updated preferences to take effect.

If that doesn't work, you can also try this:

Navigate to build settings and go to the Compile Sources phase. Double-click in the Compiler Flags column for the storyboard and enter -w to turn off all warnings for that file.

Olivia Brown
  • 266
  • 1
  • 10
  • 1
    Thanks Olivia. But only .swift files are listed in "Compile Sources". .storyboard files are listed in "Copy Bundle Resources". When i tried to drag them between those categories, I received an error. – Dorad Aug 23 '17 at 13:13
  • There seems to be a bug in XCode. Restarting XCode gets rid of the storyboard warnings temporarily, but for me they randomly reappear. I definitely have the build settings switch for storyboard warnings turned off. And it's not possible to use "-w" since storyboards are listed in the copy phase, which is odd considering that XCode has a storyboard compiler. – Paul Slocum Jul 29 '22 at 12:40