Wednesday, November 10, 2010

Problem opening .xib file(NIB file) with xCode 3.x.x

The .xib or NIB files in a iOS project are supposed to open with the Interface Builder.
-> Although the Interface Builder files end with the .xib extension, often Cocoa programmers still refer to them by their old name, NIBs.

After installing Xcode 3.2.4 and the iOS SDK 4.1 the .xib files in my projects didn't open after double click.

When right clicking on the files in Xcode it only showed under "Open As" the options Plain Text File or Source Code File. I searched the Web and people often recommend to reinstall Xcode. That totally did not work for me.

The solution


First I checked if the Interface Builder was installed on my Mac OS. I used the Spotlight (Command+Space opens the search field) and searched for Interface Builder. Surprisingly the Builder was installed on the System.

If the Interface Builder is installed you have to connect the NIB files with it. Use Finder to navigate to one of your NIB files in any Xcode project. Then right-click and use File > Open With and select Interface Builder. Since I did that one time I could always open any .xib file directly in XCode project view with double click.

0 comments:

Post a Comment