views:

2402

answers:

3

After having installed the iPhone SDK 3.1.2, Interface Builder is not in sync with Xcode anymore. The light indicator at the bottom of the XIB window is grey. IB doesn't see any files from the Xcode project. Xcode is always open when I start IB.

I tried rebooting. No luck.
I tried removing the preferences files for Xcode/IB. No luck.
I tried reinstalling Xcode/IB. Still no luck.

This page explains how IB monitors the changes in Xcode. While it was an interesting read, it didn't provide any help about how to investigate my problem.

Any help would be appreciated.

EDIT
Here's additional information. I enabled the debug logs for launchd, and I noticed the following line that appears every time Interface Builder is started:

[0x0-0x1b01b].com.apple.InterfaceBuilder3[315]: Couldn't open shared capabilities memory GSCapabilities (No such file or directory)

This really seems to be related to my issue.

+18  A: 

I have been having the same problem and it's been driving me nuts.

Bizarrely, it seems to be caused by opening your project using the File > Open Recent Project menu in Xcode, or by using the Recent Documents list in the Xcode welcome screen.

If I double-click the project file in the Finder to open it or choose the project from the Recent Items menu in the Apple menu, Xcode's connection to Interface Builder is intact.

Does that help you?

Rob Keniger
OMG, it works!! It does help me, thanks a bunch! I'm still waiting for a more "scientific" answer though ;)
Martin Cote
Glad to help, I'd love to know the cause of this too.
Rob Keniger
WOW THANKS SO MUCH. I wish I could +100 this answer. I'm not sure if this is the cause of the problem... but I had renamed my project from "ATest" to "Atest" in all the classes, file names, etc. but I did notice that the Open Recent Project menu still showed "ATest" but it opened the right project so I didn't think twice about it until now.
philfreo
I believe it's because it opens a different version of xcode. You might want to look into whether this is the case.
Kenneth Ballenegger
I have the same problem. If I open my own custom IBPlugin then I see this message written to the console. I have tried opening with Finder, both the build version as well as the release version, however the message is still emitted. This didn't help me. There must be a more scientific explanation.
neoneye
Sweet!! I just wasted an hour on this before finding this thread! :D
Shane
A: 

Rob Keniger - Bang on! Worked! I cant believe it, this has been driving me absolutely nuts for days! Well done. And thank you.

Steve
A: 

I had this problem just now because I renamed my project from Project.xcodeproj to project.xcodeproj in the finder. I wanted to keep the new lowercase name so I opened the project.pbxproj file in a text editor and manually lowercased everything there too.

It still didn't connect to IB, so then I noticed that the XIB files contain this:

    <string key="IBDocument.LastKnownRelativeProjectPath">../../Project.xcodeproj</string>

So I changed that to:

    <string key="IBDocument.LastKnownRelativeProjectPath">../../project.xcodeproj</string>

That didn't fix it either!

Finally, I noticed that the path for the group (folder on the left panel of XCode) that contain my nibs was messed up. So, I opened the project again in my editor and fixed those, and finally it was fixed.

Hopefully something in there will help you :-)

sbwoodside