Xcode won't open storyboard

When I try to re-open the storyboard I was just editing in the current production version of Xcode it says


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


What in the world do I do to fix that? I *really* don't want to go back to my last git commit for that file because there have been quite extensive changes with pretty complex autolayout settings.

Replies

Try an option-clean build folder, then restart Xcode. If those don't help, a git visit may be the only solution.


Also check for sufficient free space on your HD. Might have to restart the computer to free up ram, etc.

Is com.apple.InterfaceBuilder a prefs file? You could try moving it out of the preferences folder with Xcode closed.

Well, I've tracked this down to an NSNumberFormatter issue. If I edit the formatter attached to the NSTextField and change it to a single decimal format, then everything breaks.

<numberFormatter key="formatter" formatterBehavior="10_0" positiveFormat="0.0" negativeFormat="-0.0" hasThousandSeparators="NO" thousandSeparator="," id="Nj6-7O-9IQ">

I completely deleted the NSNumberFormatter and re-added it, set the format again and now things work nicely. Good times! Thank God for git.

Was there supposed to be an odd " count in the number formatter?

This seems to be an issue again, I fixed it by crashing Xcode (it didnt wanna close because it couldnt autosave) via Activity Monitor and then reopening and cleaning build folder.

I have same problem with no fix in sight... Apparently, a recent MacOS (M1 MBP) update included some kind of Xcode update and literally everything I've read online and tried hasn't helped. I'm Dead In Water and my app UI / storyboard is too complex to try and re-create from scratch without investing a LOT of man hours although that might be literally the only solution at this point. This is a show stopper for me. Literally no clue what else to try at this point.