I came across the fact that, in my opinion, some strange behavior in iOS - the search for StackOverflow did not show anything similar to my problem.
Essentially, if you have two .xib files with device modifiers (~ iphone and ~ ipad) and you run the iPhone application (NOT universal) on the iPad (i.e. in the iPhone simulator window), it will try to download ~ ipad xib, and not ~ iphone xib.
This is mistake? I would expect to download ~ iphone xib. Although the actual device is an iPad, it mimics the iPhone, right? So he should download the iPhone interface file?
Steps to play:
- Create a new iPhone application (not universal) in Xcode - use the "Single View" template.
- Rename ViewController.xib to ViewController ~ iphone.xib
- Duplicate and rename xib, so now you have ViewController ~ iphone.xib and ViewController ~ ipad.xib
- Run this iPhone application in the iPad simulator (or on the iPad itself) - it loads ~ ipad XIB, not ~ xix xib.
Can someone tell me how I can get around this problem? This is difficult because my actual Xcode project has several goals (1. iPhone-only app 2. iPad-only app), so I need to support all the scenarios, therefore, use device modifiers.
source share