7

The document "MainStoryBoard.storyboard" could not be opened. The operation couldn’t be completed. (com.apple.InterfaceBuilder error -1.)

Our team using SVN and when one of our developer committed the code, the others are get above message and are unable to open the MainStoryBoard. Also we have tried checking out the whole repository, but still the error exists.

Any help will be greatly appreciated.

Thanks.

Say2Manuj
  • 709
  • 10
  • 20

8 Answers8

7

Try to make sure all the UILabels in the storyboard are using plain text

UILabel text attribute = PLAIN

This solve the problem for me after almost 4 hours of trying everything!!!!

And also make sure you have installed on your system the fonts you are trying to use.

David Cespedes
  • 520
  • 1
  • 6
  • 14
4

We had this problem today - a remote developer could not open a storyboard that worked fine on two machines here. Xcode 4.5.1 and iOS 6.0.

I opened the storyboard file in BBEdit and used the "Zap Gremlins" command. It found several gremlins, all in a few attributed strings (that we were styling as a frill, not at all necessary). I closed BBEdit without saving, went back into Xcode, and removed these strings from the storyboard file. Xcode is now able to open the storyboard.

Michael J.
  • 511
  • 3
  • 4
  • As an aside, we were using git, whereas the OP was using SVN. – Michael J. Oct 25 '12 at 18:17
  • Thanks a lot, the problem was with NSAttributedString. I changed all the labels to have plain text in the storyboard, it worked :-) – Say2Manuj Oct 29 '12 at 05:45
  • 4
    Issue at my end was that the custom fonts were not installed in the xcode whereas it was there on my colleagues mac it was already installed so he was not able to do it. Make sure you have custom fonts installed in you app – Kunal Balani Jan 09 '13 at 20:33
  • This is helpful. Do you mean custom fonts for Xcode to use to display while editing, or custom fonts used in the app? – Michael J. Mar 20 '13 at 21:09
3

Kunal Balani has the right answer. It wasn't that attributed text was adding bad info into the Storyboard. It was that the other machine didn't have the font files installed.

LordBron
  • 41
  • 2
2

Custom fonts that were used by the attributed label was missing on the target machine. Installing the font solved the issue for me. Thx Kunal

exeapps
  • 119
  • 1
  • 4
2

I had the same problem when i copied a project from one MAC to another. Finally i discover that i need to install some fonts that were being use in the story board.

mcrrnz
  • 545
  • 6
  • 10
1

convert the All UILabels in the storyboard are using plain text

Anbu.Karthik
  • 82,064
  • 23
  • 174
  • 143
0

In my case the storyboard file had somehow ended up with execute permissions:

-rwxr-xr-x 1 Luna staff 106K Oct 28 00:07 Main.storyboard

Comparing this to other storyboard files in my project it was clear that was abnormal. Running chmod -x Main.storyboard fixed the problem:

-rw-r--r-- 1 Luna staff 106K Oct 28 00:07 Main.storyboard

LunaCodeGirl
  • 5,432
  • 6
  • 30
  • 36
0

For me editing the storyboard didn't solve the problem. The only thing that worked was to create a new storyboard file, open the old and the new storyboards as source code (right click -> open as), and copy the xml from the old to the new storyboard. I didn't take the whole xml, just the scope of the <scenes> </scenes>

Shaked Sayag
  • 5,712
  • 2
  • 31
  • 38