I’ve recently started to create all my projects as universal apps from the start just in case an iPad version is needed by the client in the future. This could end up saving me and my client some valuable time.
However, upon creating a finished iPhone app and running it on my iPad, I was presented with a plain white screen. Clearly the iPad nib was being displayed instead of the iPhone one. So I went into the .plist file for the app, found the “Main nib file base name (iPad)” entry and changed it from “MainWindow_iPad” to “MainWindow_iPhone”. Lo and behold, the iPhone version was displayed.
One problem though, the app was stretched to fill the iPad’s screen and looked a bit strange. I simply wanted to see the iPhone version in the smaller window like normal, non-universal apps. So I went back into my universal project and checked out the build settings in the project info window. In there, I found an entry called “Targeted Device Family” which was set to “iPhone/iPad”. I tried changing it to just “iPhone”, ran the app and was pleased to see my beautifully designed iPhone app displaying as it should in the smaller window on the iPad.
To recap, the steps needed are:
- Change the “Main nib file base name (iPad)” entry in the .plist file for the app from “MainWindow_iPad” to “MainWindow_iPhone”.
- Change the “Targeted Device Family” in the project info build settings from “iPhone/iPad” to just “iPhone”.
Of course it would be great if the app was built with a proper iPad interface too, but that’s for another day and another budget!