2

My team has a project and we are updating our codes by pushing/pulling it on bitbucket.org. We encountered a problem lately, we cannot open the storyboard of the pulled updated project code. This is what the error said:

The document "MainStoryboard.storyboard" could not be opened. The operation couldn’t be completed. (com.apple.InterfaceBuilder error -1.) and this is the screen shot

Story Board Error

Do you have any idea why this happened? What possible wrong move did we do? and do you have any idea how to fix it..?

EDIT

I have already upgraded to Xcode 4.6.3 but I still get this error.

caribbean
  • 748
  • 1
  • 9
  • 29
  • If someone has opened storyboard in Xcode5 and "upgraded" it to Xcode5 format, it could become uneditable in Xcode4. – Eimantas Jul 16 '13 at 11:20
  • We are all using Xcode 4.6.1, do you think it mattered because the said laptop that the storyboard do not open uses also Xcode 4.6.1 when his OS is Mac OS X 10.7, don't you think I need to install more compatible Version to it like let's say Xcode 4.6.3? – caribbean Jul 16 '13 at 11:29
  • There should be no incompatibility issues between build numbers of Xcode. So I can't really tell you what's wrong. Reinstalling Xcode might help. – Eimantas Jul 16 '13 at 12:25
  • @Eimantas, I tried but it did no help.. – caribbean Jul 16 '13 at 12:31
  • possible duplicate of [com.apple.InterfaceBuilder error -1. Storyboard Can Not Be Opened](http://stackoverflow.com/questions/17495793/com-apple-interfacebuilder-error-1-storyboard-can-not-be-opened) – Laszlo Sep 11 '15 at 13:28

3 Answers3

3

I recently found the answer for this, what we did is

  1. We open the Console Log.
  2. While the console log is open, we tried to open the broken storyboard.
  3. We found the error in console log, in this case we found this : Exception raised while unarchiving document objects - *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil

We found out that we used a font style in that storyboard in the other computer, and that font style was not installed in the other Macbook that's why we had that error stated above.

4 . We installed missing font style in the other Macbook.

This question helped us a lot - xcode storyboard - ibtoold unarchiving exception

Community
  • 1
  • 1
caribbean
  • 748
  • 1
  • 9
  • 29
0

Try doing git status in terminal to make sure you have a clean copy of the file, not one with local modifications and/or merge conflicts.

Open the file with a text editor and see if it looks the same as on other machines.

Have you looked at the console tab in XCode to see what it says the problem is?

rjmunro
  • 27,203
  • 20
  • 110
  • 132
  • it does not return any error in the console, and as far as I know I have a clean copy, in fact what I am trying to run is just a clone of the current pushed code in git – caribbean Jul 16 '13 at 13:00
0

I had this problem. Turned out it was an attributed string causing the issue. I had to manually edit the storyboard file to replace it with a regular string (i.e. replace the <state>...</state> section). Look for hasAttributed...=YES in your storyboard file and go from there.

Ex. Replace stuff like:

<state key="normal">
  <attributedString key="attributedTitle">
    <fragment content="Sign up">
      ...
    </fragment>
  </attributedString>
</state>

With:

<state key="normal" title="Sign up">
  ...
</state>
David Carney
  • 2,200
  • 1
  • 19
  • 28