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.