0

In the Simulator, my universal app runs fine in iOS 5, but in iOS 6 it grabs MainWindow.xib instead of MainWindow~ipad.xib. I have "Main Nib File Base Name (iPad)" (NSMainNibFile~ipad) set properly in the plist. Every other combination works fine (iPhone, iPhone HD, iPhone 5, and iPad on iOS 5; iPhone, iPhone HD, and iPhone 5 on iOS 6).

Here's the relevant section from the plist:

<key>NSMainNibFile</key>
<string>MainWindow</string>
<key>NSMainNibFile~ipad</key>
<string>MainWindow~ipad</string>

I'm at my wit's end, having recreated the iPad Xib from scratch, reset the Simulator, cleaned Xcode's cache (Clean menu option and DerivedData folder), and everything else I could think of short of sacrificing a chicken (including the ideas on Universal app for iPad not loading iPad .xib files?). I'm running the current version of Xcode (4.5.2) on Lion.

Any ideas? Thanks!

Community
  • 1
  • 1

1 Answers1

0

Solution: use "MainWindow~iPhone.xib" (iPhone) and "MainWindow.xib" (iPad).

The answer was found in this old post:

http://oleb.net/blog/2010/04/universal-app-is-not-a-universal-binary/

but was also in the linked thread above (I had some other problems, including some missing Xib connections, which may have caused it to fail for me earlier).

  • Sorry, false alarm. All that did was make the iPad version work and the iPhone version fail. – user1281726 Nov 09 '12 at 19:03
  • The real solution: "You can explicitly[...] specify the nib file. Go to Xib/MainWindow-iPhone.xib/Base ViewC, under the Attributes tab on the right, you should see a View Controller section. Under the NIB Name, select BaseViewC-iPhone. Do the same for the rest of Xib file." – user1281726 Nov 11 '12 at 17:52