Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Storyboard Internal Inconsistencies

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

like image 582
Beto Avatar asked Sep 23 '13 19:09

Beto


5 Answers

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.

like image 64
Marcy Avatar answered Oct 20 '22 10:10

Marcy


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.

like image 34
Greg Avatar answered Oct 20 '22 12:10

Greg


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

like image 38
Robert Avatar answered Oct 20 '22 10:10

Robert


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.

like image 1
solange Avatar answered Oct 20 '22 11:10

solange


After installing Mavericks and Xcode 5.0.1 the problem was fixed.

like image 1
Beto Avatar answered Oct 20 '22 12:10

Beto