Storyboard Internal Inconsistencies

2019-02-21 22:38发布

I have a similar situation explain on this thread (XCode 5 Storyboard Internal Inconsistencies), but I installed the final version of the Xcode and never installed any beta version. Additionally, I can't add comments in previous thread cause I don't have enough points. So i need to ask my specific case.

In XCode 5, I have a problem with all of my projects "The document 'main.storyboard' has X internal inconsistencies that were found and repaired. Please save this document to fix the inconsistencies."

If you choose to list the inconsistencies, you see that it's saying that some Images in my resources section, that uses this image, and is duplicating in the Storyboard. I try to save the document, but it does nothing, and when I relaunch the project, I get the same error.

I try all this things with NO SUCCESS:

  • I delete all duplicates in storyboardFile file.
  • Drop the image file from my project and add again.
  • Reconnect UIButtons with the problem image.
  • Change the image name file.

In my research, also I create a new project in XCode 5, add a same image in two objects inside Storyboard and got the same message.

Anyone have the similar problem?, and more important, anyone have a solution?

I have XCode 5 and OSX 10.8.5.

**** UPDATE ***** I found a workaround. The error is generated when one image inside the storyboard is used several times, if you delete the reference of the image and assign the image to the object by code, the error disappears, but I don't like it. I'll research a little more, but apparently is a bug from Xcode (I hope not).

5条回答
看我几分像从前
2楼-- · 2019-02-21 23:21

I upgraded to Xcode 5 last night and am experiencing multiple issues, including the one you described above. I also seem to have found a workaround, albeit different from the one you found.

To get rid of it I saved the project, closed it, opened a different project and ran it in the simulator, quit Xcode then reloaded the original project.

Error message no longer appeared.

I have no idea why but this seems to have solved it for me.

Now to tackle the other niggles......... :-/

查看更多
smile是对你的礼貌
3楼-- · 2019-02-21 23:24

Same error today after upgrading to Xcode 5: internal inconsistencies relating to images that are used more than once in storyboard, but I found a solution that worked for me here: https://devforums.apple.com/message/883402#883402.

I created a new Asset Catalog (New file / choose "Resource" / Asset Catalog).

Once created, I selected the option 'Import from project' and imported all my images. Seems to have done the trick.

查看更多
女痞
4楼-- · 2019-02-21 23:28

Try to find under inferredMetricsTieBreakers section at the end of the storyboard unused segue references in the whole document as in the photo

enter image description here

查看更多
Explosion°爆炸
5楼-- · 2019-02-21 23:33

An easy way to fix this problem is to open up the Storyboard in TextEdit, then go down to the resources section at the end and delete any duplicate entries for images you see. They're sorted alphabetically, so it's fairly simple to do.

Saved the file, loaded up XCode and no more error messages.

查看更多
对你真心纯属浪费
6楼-- · 2019-02-21 23:35

After installing Mavericks and Xcode 5.0.1 the problem was fixed.

查看更多
登录 后发表回答