Universal App Uses Wrong Xib for iPad in iOS 6 Simulator
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!
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).
链接地址: http://www.djcxy.com/p/95716.html上一篇: 设备识别码在哪里?