Nib file not showing up in Xcode 13.0 interface builder

I am running a MacPro7,1 with Big Sur 11.6 and Xcode 13.0. When I open the main nib file for my application, the editor is completely blank -- nothing shows up. The app builds and runs as expected, so it is not like the nib has vanished.

The nib has been visible recently, but I am not aware of anything unusual that I might have done to it to cause damage.

The behavior repeats after a project clean, and also after closing Xcode and reopening it.

Does anyone have any ideas of what might be going on, and how to fix the problem?

Accepted Reply

The storyboard is not scrolled off view, and what is very strange is, that when I pull down the Editor menu with the nib view selected, it does not have a Minimap entry -- it is not that the entry is grayed out, there is no such entry.

I have not tried to create a new project, but the problem seems to occur with several different existing nib files.

I have not seen this problem in Xcodes previous to Xcode 13.

I find no relevant errors in the issues navigator. In particular, I ran a full analyze and no messages came up concerning the nib file. And as I said before, the builds complete with no errors and the product runs as expected.

I have MORE INFORMATION:

When I do the following:

1) Close Xcode.
2) Locate the nib file in question in the finder.
3) Control-click the nib file in the finder, and select "Open with Xcode" ...

Then Xcode opens the nib file in a different kind of window than the one that opens when I open a project. This "different" window shows just the nib file. This window perhaps resembles Interface Builder windows from the days when the Interface Builder was a separate application. The window shows the nib file and allows me to edit it, and changes I make there show up when I (subsequently) open the project, then build and run it. But I still cannot view the nib file in the project viewer, even after I have edited it in the different window, and closed and reopened Xcode.

I have noticed one odd thing. In the "different" window, the editor in that window identifies the nib by name and has a "Type" pull-down menu, which shows "Default -- Interface Builder Cocoa NIB". But when I look at the nib file in the project-viewer window, the editor there does not have a "Type" menu at all.

I conjecture that Xcode's project-viewing system has somehow gotten the wrong idea of what the nib file's type is (since Xcode's build system evidently can deal with the file, and the "different" window can also deal with it). But I may be wrong, and have no idea how to debug further.

  • When you select your project, at the very top of the file browser, and open File Inspector, what project format do you get (it is listed as Xcode x.y compatible). Could you try to set to 13.0 ? What is the answer to the last question "When you look at issues Navigator (left panel), do you get error messages ?"

  • When you select your project, at the very top of the file browser, and open File Inspector, what project format do you get (it is listed as Xcode x.y compatible). Could you try to set to 13.0 ? What is the answer to the last question "When you look at issues Navigator (left panel), do you get error messages ?" Can you also open the nib file as Source code (right click on the nib file in file browser and select "Open As >"

  • Responding to Claude31: Sorry to take so long ...

    When I select the project and open the file inspector, I see a panel at the right with the name and location of the project file correctly shown, but nothing else is visible there. There is no project-format information shown. The issues navigator shows many issues related to the code itself when I build or analyze -- this is an old project that needs lots of refactoring -- but nothing that suggests a problem with the project file itself.

    There is no option for "source code" in the "Open as" menu, but when I investigate with (e.g.) EMacs, I find that "MainMenu.nib" is a directory containing three ".nib" items; namely "designable.nib", "keyedobjects.nib" and "keyedobjects-101300.nib". All three are files. "designable.nib" is HTML, and the other two appear as binary files with the text "NIBArchive" the first thing in the file.

    The HTML for "designable.nib" starts with:

Replies

Sorry for this basic question: are you sure storyboard is not just scrolled off view ?

  • select storyboard panel
  • show Minimap: Editor > Minimap menu item.

Does it occur on a new project as well ?

Is it since you updated to Xcode 13 ?

When you look at issues Navigator (left panel), do you get error messages ?

  • And yes, the storyboard is not just scrolled off view. There is no "Minimap" option in the Editor drop-down menu. I suspect that Xcode simply cannot find the right editor when I open the nib from within the project, though it does when I start with no Xcode running and use the Finder "Open with" option to open the file with Xcode.

    New projects do not have the problem. And the nib did open correctly in older Xcodes.

Add a Comment

The storyboard is not scrolled off view, and what is very strange is, that when I pull down the Editor menu with the nib view selected, it does not have a Minimap entry -- it is not that the entry is grayed out, there is no such entry.

I have not tried to create a new project, but the problem seems to occur with several different existing nib files.

I have not seen this problem in Xcodes previous to Xcode 13.

I find no relevant errors in the issues navigator. In particular, I ran a full analyze and no messages came up concerning the nib file. And as I said before, the builds complete with no errors and the product runs as expected.

I have MORE INFORMATION:

When I do the following:

1) Close Xcode.
2) Locate the nib file in question in the finder.
3) Control-click the nib file in the finder, and select "Open with Xcode" ...

Then Xcode opens the nib file in a different kind of window than the one that opens when I open a project. This "different" window shows just the nib file. This window perhaps resembles Interface Builder windows from the days when the Interface Builder was a separate application. The window shows the nib file and allows me to edit it, and changes I make there show up when I (subsequently) open the project, then build and run it. But I still cannot view the nib file in the project viewer, even after I have edited it in the different window, and closed and reopened Xcode.

I have noticed one odd thing. In the "different" window, the editor in that window identifies the nib by name and has a "Type" pull-down menu, which shows "Default -- Interface Builder Cocoa NIB". But when I look at the nib file in the project-viewer window, the editor there does not have a "Type" menu at all.

I conjecture that Xcode's project-viewing system has somehow gotten the wrong idea of what the nib file's type is (since Xcode's build system evidently can deal with the file, and the "different" window can also deal with it). But I may be wrong, and have no idea how to debug further.

  • When you select your project, at the very top of the file browser, and open File Inspector, what project format do you get (it is listed as Xcode x.y compatible). Could you try to set to 13.0 ? What is the answer to the last question "When you look at issues Navigator (left panel), do you get error messages ?"

  • When you select your project, at the very top of the file browser, and open File Inspector, what project format do you get (it is listed as Xcode x.y compatible). Could you try to set to 13.0 ? What is the answer to the last question "When you look at issues Navigator (left panel), do you get error messages ?" Can you also open the nib file as Source code (right click on the nib file in file browser and select "Open As >"

  • Responding to Claude31: Sorry to take so long ...

    When I select the project and open the file inspector, I see a panel at the right with the name and location of the project file correctly shown, but nothing else is visible there. There is no project-format information shown. The issues navigator shows many issues related to the code itself when I build or analyze -- this is an old project that needs lots of refactoring -- but nothing that suggests a problem with the project file itself.

    There is no option for "source code" in the "Open as" menu, but when I investigate with (e.g.) EMacs, I find that "MainMenu.nib" is a directory containing three ".nib" items; namely "designable.nib", "keyedobjects.nib" and "keyedobjects-101300.nib". All three are files. "designable.nib" is HTML, and the other two appear as binary files with the text "NIBArchive" the first thing in the file.

    The HTML for "designable.nib" starts with:

I have further information: I deleted Xcode and downloaded a new copy -- no fix.

Absolutely nuts - same issue with Xcode 13.1

  • I resolved by downloading a fresh GitHub clone, but Xcode shouldn't be doing this.

Add a Comment

same issue with Xcode 13.2.1