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?
For me it works like this:
build phases
tab in copy bundle resources
build phases
tabI 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.
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.ibtool.errors</key>
<array>
<dict>
<key>description</key>
<string>Interface Builder could not open the document "MyVC.xib" because it does not exist.</string>
</dict>
</array>
</dict>
</plist>
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.
$
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With