8
votes

I want Xcode to ignore the following warning:

"Automatic Preferred Max Layout Width is not available on iOS versions prior to 8.0."

Is there a way to tell Xcode not to show this specific warning?

3
I know the reason for this warning - I just want Xcode to ignore itYogevSitton
There is --warnings flag for ibtool, I don't know how to remove this flag from the command.Inder Kumar Rathore

3 Answers

2
votes

Navigate to your project file in Xcode and select Build Settings. Ensure all build settings are showed and it is Combined. Scroll down until you see a section called "Interface Builder Storyboard Compiler - Options". There should be a show warnings section for that, just set it to No and recompile and the warning should go away. If it does not just restart Xcode and then the warning should be gone.

Example

1
votes

If you find out the way to remove --warnings flag for ibtool then you might ignore all the warnings from the nib file.

The workaround is to build this storyboard for iOS8.0

enter image description here

NOTE: Though it removes the warning but I have never run the app on iOS7 and I don't know what's the impact of this change.

Also do notify me if you find a better solution

-1
votes

You should follow below steps :

Select Project Build Settings -> Interface Builder Storyboard Compiler - Options -> Show Warnings -> set to "NO"

Note that if you wish to clear existing warnings you can clean your project using Shift+⌘+k

you can do it by code but don't know for the storyboard working

#pragma GCC diagnostic ignored "-Wwarning-flag"

Hope this will help you.