When attempting to modify a file with
Interface Builder, you'll possibly get the below error, particularly when editing system files:
|
"The document "LoginWindowUI.nib" could not be opened. Interface Builder cannot open compiled nibs. Try opening the source document instead of the compiled nib." |
The problem comes from the .nib file not containing the
classes.nib and
login.nib files. The fix is pretty simple:
- First, download and unzip this, which has dummy versions of both needed files.
- Right-click on the file you want to edit and choose "Show Package Contents".
- A new window should come up, and there will be one file, keyedobjects.nib, listed.
- Copy classes.nib and login.nib into this folder.
- You should now be able to open the original .nib file.
12 comments:
What .nib are you trying to edit? The .nib should likely have an Interface Builder Document icon.
If you are trying to do this on keyedobjects.nib, you don't need to. Simply drop the files into the same folder as that file, step back one level, and open the file.
Still suffering same's Adam's problem... any idea?
Thanks for the tip :)
What .nib (path, if possible, and application if applicable)? Can you navigate into the .nib using Terminal? What OS? Does this option never show up or just with this file?
Let me know...
HEllo,
thank you very much for this information. I was finally able to open the .nib file.
However, another obstacle. I can not save any changes to the file. It says I don't have permission. I changed all permissions in all files (by clicking "get info" and then setting myself as the owner in bottom of get info window).
Do you know if this is a common problem?
Hey! I don't know how but now it saves! Anyway, this thread was the only answer I could find on how to open the .nib file.
So, thanks a lot!
Sincerely,
-D
I've never seen said problem. I'd be careful with changing permissions too much...and always work on a backup just in case.
Glad my post helped!
I am attempting to edit a system file .nib
I use a copy of that file and it does not have a "Show Package Contents" option.
Other .nib files do, at least the editable compiled ones.
Yes I can navigate to it in Terminal.
How can Terminal help me?
How did Dominick solve this problem?
I found the solution!
If you have a .nib file that does ~not~ have "Show Package Contents" available under right-click or control-click…
Then you get a working .nib file that is uncompiled and ~does~ have "Show Package Contents" available.
It must also have "classes.nib", "info.nib", and "keyedobjects.nib" within the package contents of this uncompiled .nib file.
Take the compiled .nib that you cannot open the package contents with.
Then rename it to "keyedobjects.nib"
Drop the new "keyedobjects.nib" into a working copy that contains the 3 .nib files named above.
Then open that .nib file with Xcode 4.1 or greater, or interface builder.
If it fails in interface builder, open with Xcode so it can be repaired.
Thanks for the feedback and solution!
2023 失效了
2023 year it not work
Yes, unfortunately in newer versions of macOS, it no longer works. The ".nib" files I've found are locked, and don't seem to have the some kind of content as they used to.
Post a Comment