Upgrade All NIB Files to XIB

When Xcode 3.0 was released Apple introduced a new file format for the source code-unfriendly NIB format to the XIB format. XIB files are text-based and far easier to work with when you need to diff you changes before submitting them to version control. XIB files are only used during development and turn into the more efficient and smaller compressed NIB format when you build the product.

In a recent project I used iLocalize 3.8.4 to manage the localization process. The problem with iLocalize is that it only exports in NIB format so my English resource files were in XIB format, but all of the localized resources were in NIB. Fortunately, there’s a quick and easy way to do this with a single Terminal window session. Just type:

ls | grep nib | xargs -L1 ibtool --upgrade

and all of the NIB files in your folder will now have a corresponding XIB file.

iLocalize should do this for you automatically. Sadly, it seems like future development on this product has ceased.

About the author

Terry Blanchard

I'm the Vice President of Engineering at Readdle, ex-Apple, design evangelist, drummer, and gadget junkie extraordinaire.

Leave a Reply

Your email address will not be published. Required fields are marked *