Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interface Builder unable to determine type of storyboard

Gone through all the links on google and on here and a lot didn't have answers to them. I have an app that has a MainStoryboard.storyboard and a MainStoryboard_iPad.storyboard. The iPad storyboard opens fine. The "MainStoryboard.storyboard" throws the following error when I click on it in Xcode: "Interface Builder was unable to determine the type of "MainStoryboard.storyboard"." I cannot view or change the storyboard and it prevents the app from building. The build error is "The operation couldn’t be completed. (com.apple.InterfaceBuilder error 2001.)"

So here's what has happened on my end that I'm aware of in the past week. I was on Mavericks and the app built and ran just fine. I am in the middle of a move so I have not touched anything is 6 days. Today I installed Yosemite and upgraded Xcode to 6.1. I launched Xcode selected my storyboard, and these errors occurred.

I checked that the correct storyboard was chosen in build settings and it is.

I tried to rename the storyboard and duplicate it and that of course hasn't worked. I'm not sure if I screwed something up a week ago when I was working on it or if the upgrade to Yosemite messed something up or what. I've looked online and haven't really found any help. Other than reading the errors it throws, I'm not really sure what else to check either.

If anyone has help or has knows of things I can check to help further diagnose the issue I'd greatly appreciate it.

Here's screenshots of the errors. http://i62.tinypic.com/21r02p.png http://i60.tinypic.com/2r4txsw.png

P.S. I should mention I'm looking for solutions that don't require me to recreate the entire thing again. I could do that, but I am hoping that I can find a solution that won't be as time consuming. Hoping this is a "simple" issue to fix.

like image 362
Brent Avatar asked Oct 22 '14 21:10

Brent


People also ask

Should I use Xib or storyboard?

BUT, if you a professional developer, you MUST use xibs for VCs, Cells, etc, Because this is the only way to make them really reusable and portable, in order to gain so much time for the next project, or even when having to make a little change or build the storyboard again.

How do I add a storyboard in Swift?

From the File menu, choose New→New File... In the New File dialog, make sure you have selected the Resource subcategory of the iOS category on the left. Then choose the Storyboard item on the right and press Next (see Figure 4-24). In this screen, pick the Device Family for which you want to create your storyboard.

How do I add a storyboard to an existing Xcode project?

Add new storyboard to the project by File->New->File... ->Userinterface->storyboard. Go to project summary and select MainStoryboard and select the storyboard name you just created.


2 Answers

In my case, I edited my storyboard via a text editor and got the wrong set of double-quotes,if this is your case: it will be obvious when you open the storyboard file as source. (xml)

Then the last item/Controller you were working on, Delete (or edit if you're familiar with the xml layout) and it will load normally

like image 167
Okikioluwa Avatar answered Jan 03 '23 20:01

Okikioluwa


I just had this issue and fixed it by deleting the file and reseting it in version control.

If your project isn't in version control you could try:

  1. Copying the storyboard source
  2. Removing the file from the project
  3. Making a new storyboard with the same name
  4. Pasting the old storyboard source into the new file
like image 43
RasTheDestroyer Avatar answered Jan 03 '23 19:01

RasTheDestroyer