Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Storyboard Warning not providing context: Unsupported Configuration of constraint attributes

I have this warning, which does not appear to cause any issues when running, but it has been the only warning I have for a while now, and I'd like to see it gone.

enter image description here

Clicking it opens the storyboard, but nothing is selected in the view hierarchy nor on the storyboard. Right clicking and clicking "view in log" does nothing. Right clicking and selecting "Open As > Source Code" crashes XCode every time. Right clicking the storyboard from the project navigator and opening as source code does not show any warning information near the top, as other storyboard warnings I have encountered did.

I can not find any information on this warning on SO or Apple documentation. I can find other "Unsupported Configuration" warnings, but none with this type of message.

Any idea how I can find the source of and resolve this warning?

Thanks

Edit - My particular issue is a bug on Apple's part, dealing with web views, and there is no way around it. It is mis-categorizing a warning. If you've got this error with similar results while trying to source it as I have, you may be running into the same issue: https://forums.developer.apple.com/thread/63254

However, JOM's answer is incredibly helpful for fixing what seems to be the actual intended occurrence of this warning, as well as very helpful for tracking similar issues. Seeing as how it provides the proper way of resolving this warning, and people are more likely to find this question by running into the warning and not experiencing the same issue as me, I'll mark it as correct.

And for better SEO, the warning is: "Unsupported configuration of constraint attributes. This may produce unexpected results at runtime before Xcode 5.1"

like image 509
Jake T. Avatar asked Nov 22 '16 22:11

Jake T.


1 Answers

Open build log and check the warning by expanding the details by tapping the small box icon at right side of the warning. You should find something like this at the end:

/* com.apple.ibtool.document.warnings */ /Users/username/git/folder/project/Collection/Collection.storyboard:2f5-sJ-euT: warning: Unsupported configuration of constraint attributes. This may produce unexpected results at runtime before Xcode 5.1

Now open that storyboard as Source Code and search for the ID mentioned in warning. In this case it's 2f5-sJ-euT. You should find something like this:

<constraint firstAttribute="centerX" secondItem="ReE-6A-euY"
    secondAttribute="centerX" id="2f5-sJ-euT"/>

Now you can check what's the problem. To help that you could e.g. check where is this constraint by looking at possible reuseIdentifier of the containing object. Makes it easier to find it, when you open the storyboard in Storyboard format.

In my case the warning was about a constraint that wasn't needed any more and I just removed it. And tested that the app still worked like it was supposed to, of course.

like image 169
JOM Avatar answered Sep 28 '22 09:09

JOM