8

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?

YogevSitton
  • 10,068
  • 11
  • 62
  • 95
  • Hope this helps you:http://stackoverflow.com/questions/25398312/automatic-preferred-max-layout-width-is-not-available-on-ios-versions-prior-to-8 – soumya Jul 21 '15 at 06:38
  • I know the reason for this warning - I just want Xcode to ignore it – YogevSitton Jul 21 '15 at 06:40
  • There is `--warnings` flag for [ibtool](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/ibtool.1.html), I don't know how to remove this flag from the command. – Inder Kumar Rathore Jul 21 '15 at 06:53
  • 1
    http://stackoverflow.com/questions/18965782/how-to-suppress-warnings-in-xcode – Ersin Sezgin Jul 21 '15 at 06:58

3 Answers3

2

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

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

Community
  • 1
  • 1
Inder Kumar Rathore
  • 39,458
  • 17
  • 135
  • 184
-1

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.

Premal Khetani
  • 3,175
  • 1
  • 26
  • 58