aakpro aakpro - 11 months ago 53
iOS Question

Can't open storyboard or xib files in xCode 6 or more

Every time I try to open storyboards and xib files in new xCode 6 or 6.1 and on Yosemite. This happens while my colleague can open it in xCode 6 on Maverick. I repeatedly get following error:

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

I still can open it on xCode 5 on Yosemite. I also tried this method:

Open xib file in an text editor and remove all ImageViews' property of ImageName which has .png format; It helped to open some of it but not All of them!

It is a very bad situation and I am stuck!

This information are provided by console:

Exception raised while unarchiving document objects - -[NSTaggedPointerString getCharacters:range:]: Range {0, 10} out of bounds; string length 4

What is the problem and how can I solve it?

Answer Source

Well the problem was with name of some images I used in UIImageViews.

I opened xib files in a text editor and find all of these patterns "X/Y.png". And I replaced it with "Y.png".

That solved my problem!