11

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).

Community
  • 1
  • 1
Beto
  • 3,438
  • 5
  • 30
  • 37

6 Answers6

10

This problem occurred for me Xcode 10.1 but was resolved. The error message provided a "Show Details" button.

error message

Clicking on Show Details showed my problem, a duplicate. specific error

Right-clicked on the identified storyboard (Main.storyboard) to open as source code. menu selection

Searched for the duplicate declarations and removed one of the duplicates.source code

The error message no longer occurs including when the storyboard is reopened.

Marcy
  • 4,611
  • 2
  • 34
  • 52
  • Great this worked for me, but i had to open the source file with an external editor. Doing this from xcode did not work. – Wil Jun 26 '20 at 07:33
  • 2
    The Problem is, that Xcode keeps adding these, so you permanently have to remove them by hand... – MeXx Jul 21 '20 at 13:16
9

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.

Greg
  • 533
  • 3
  • 14
  • 1
    +1 for this. For me the errors were always to do with named colours, they were getting duplicated for some reason, and deleting the duplicate named colour fixes the problem. Thanks for telling us where to look. – CristianMoisei Jul 28 '19 at 08:23
1

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......... :-/

Robert
  • 5,278
  • 43
  • 65
  • 115
  • Thanks @Robert, but did not worked for me. Apparently works when you open the storyboard first time, but the error shows again after you reopen the project. – Beto Sep 24 '13 at 16:17
  • Weird, isn't it? I just ran into the problem again and the above solution worked this time as well. I still have no idea why. – Robert Sep 27 '13 at 08:36
1

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.

solange
  • 335
  • 3
  • 7
1

After installing Mavericks and Xcode 5.0.1 the problem was fixed.

Beto
  • 3,438
  • 5
  • 30
  • 37
0

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

Khaled Annajar
  • 15,542
  • 5
  • 34
  • 45