Search code examples
iphoneipadioslocalizationuniversal-binary

Resource problem - Localization and iPhone/iPad XIBs all broken


I had a localized universal application. I copied a bunch of resources (XIB) files from an old project into the appropriate locations (English.lprog) directories for both iPhone (Filename~iPhone.xib) and iPad (Filename~iPad.xib). I added them to the project, and they all appear correctly in Xcode, as localizations, etc. I can open the localized files for each device in XCode/IB, and everything appears correct.

Now, when I run the project - everything is completely haywire. In short, when I run in English on the iPad simulator, I get the Chinese version of the iPhone XIBs!!!

I can't figure out what the problem is - any idea how to dig deeper?!


Solution

  • Few things fixed this:

    1. Total clean build of project

    2. Erase old application from device and/or simulator before reinstall.

    3. Just because the icon in XCode looks like an IB icon, and double-clicking opens in IB, it still MUST have an ".xib" extension visible on the file.

    4. Simulator is NOT case sensitive, but iPhone IS. This includes differences like MyClass~iphone.xib (works) vs. MyClass~iPhone.xib (doesn't work).