There is no way to hide warnings in a Storyboard or Nib

Originator:craig.hockenberry
Number:rdar://49867132 Date Originated:4/11/2019
Status:Duplicate/16161674 Resolved:
Product:Xcode Product Version:10.2
Classification:Serious Reproducible:Always
 
Summary:

I, and many other developers, like to build projects without any warnings: it's a good way to keep you honest.

Sometimes you do something that's a little out of the ordinary and have to resort to #pragma clang diagnostic to silence the warning. In my mind, this explicit action is fine - I'm taking control of the issue away from the compiler. It's my code and my responsibility.

Unfortunately, this is not possible with a Storyboard or Nib that's managed by Xcode. There's no way to say "this is fine."

Maybe it's with Auto Layout Localization on some text you know won't be localized or has a fixed width in all languages (Emoji, for example).

Maybe it's a frame for a table view cell that's wrong in its container but will be right when that container is embedded in another container.

Maybe it's when you don't assign a content view controller to your window controller in the storyboard, but it's the first thing you do in the runtime logic.

Whatever the reason, there's no way to suppress these warnings and they break the "no warnings" rule we set for ourselves.

Steps to Reproduce:

Do one of the things mentioned above.

Expected Results:

You'd have a way to suppress the warnings.

Actual Results:

You have no way to suppress the warnings.

Version/Build:

Version 10.2 (10E125)

Configuration:

N/A

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!