Interface Builder and Xcode integration not working

Viewed 11628

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.

6 Answers

This was driving me nuts for a couple hours today. Opening the project from Finder did the trick for me, but I haven't found an explanation for why this trick works. So I poked around a bit and I suspect it has something to do with tilde expansion. If I create a new project outside of my home folder, Xcode and IB have no problems.

This is what I've noticed: when I create a new project and save it anywhere under my own home folder (e.g. Documents), the path listed under the project in the "Welcome to Xcode" screen is "~/Documents". If I clear the "Open Recent Project" menu and then open the project via Finder, the project path is then shown as "/users/[username]/Documents". At this point, Xcode and IB work fine even if the project is opened via the Recent Projects list.

I suspect the Xcode<->IB sync is getting confused by the tilde and the reason it works fine when opened via Finder is that the path is expanded before being passed to Xcode (and then to IB).

One other trick I found was that when IB refuses to sync, opening the xib directly via IB's File->Open menu fixes it.

Related