Take the 2-minute tour ×

I am localizing an app, following the steps listed here. I have successfully achieved that with around 45 .xib's, while just 4 of them gives me this error:

"Interface Builder could not open the document ".xib" because it does not exist."

when I move them from their original position. I try to move them from their Project/Classes/Example.xib position to the localized one on Project/en.lproj/Example.xib.

Why can't this .xib files be moved?

share|improve this question
did you move them using XCode ? or using Finder ? doing that into XCode shouldn't produce any error. It sounds like you did it with Finder, to localize you NIB files, select it in the project, then in the Utilities view > File Inspector choose '+' in the Localizations section. –  user971401 Jan 23 '12 at 9:28
All right! It worked for almost all. But there is still one that doesn't work. I can't understand why. I just select the .xib, open File Inspector, add English localization with the "+" button, and compile. Same error pops.... –  MrSueko Jan 24 '12 at 2:51

4 Answers 4

I experienced the same error when running ibtools on .xib files in two different directories. It worked fine with the files in the first directory, but failed on the files in the second directory. If I swapped the order of processing the directories it still failed for the second directory.

Finally I discovered that ibtool starts a demon process ibtoold that doesn't terminate when ibtool finishes, and if I killed that process I no longer got the error. Apparently the demon has some state that hinders ibtool in working in another directory.

I used pkill ibtoold to kill the demon.

share|improve this answer
killall -9 ibtoold worked better for me. Checkout useful script and article. –  DanSkeel Dec 2 at 16:06

I am having a problem using Xcode 5 that might be the same issue. ibtools is randomly working when generating or writing localized strings to/from xib files. I had to use sudo on some xib files to get it to work. Here's an example:

$ibtool --generate-strings-file en.lproj/MyVC.strings en.lproj/MyVC.xib
<plist version="1.0">
        <string>Interface Builder could not open the document "MyVC.xib" because it does not exist.</string>

Using sudo works although it complains about 'user domains will be volatile'

$sudo ibtool --generate-strings-file en.lproj/MyVC.strings en.lproj/MyVC.xib
2013-10-01 10:04:35.943 Interface Builder Cocoa Touch Tool[1717:303] CFPreferences: user       
home directory at file:///var/root/Library/Application%20Support/iPhone%20Simulator/User/ is unavailable. User domains will be volatile.
share|improve this answer

For me it works like this:

  • select project target
  • remove the file from the build phases tab in copy bundle resources
  • re add it to the build phases tab
share|improve this answer
This just saved me hours of work –  mcjoejoe0911 Feb 11 at 16:31

To me this happened after a Git merge. The project file must have changed so much that now it gives all these errors. Those sensitive project files...

So anyway, what I ended up doing is just removing the files from the project (sending them to Trash) and then re-adding them to the project with a git checkout other_branch path/to/file

After this, building the project did not throw this error anymore.

  • It seems to work fine also if you remove just the reference and then re-add the file to the project (no need to send it to Trash)
  • Important You should remove any red files from your Build Phases - Compile Sources of your target's settings. Those are files that XCode thinks are still there and thinks it should still try to compile, but when it doesn't find them, it gives back this error.
share|improve this answer

Your Answer


