Search code examples
iphonexcodeipadiosios4

Xcode - How to make a universal app


I have an iPhone app and I want to make it universal, but I don't know how to go about doing this, at least properly anyway. Earlier I tried the "upgrade current target to iPad" but it didn't work properly, but luckily I saved a backup from just before trying it.

Anyway, can anyone advise me on how to do this?


Solution

  • Create a new MainWindow_iPad.xib file targeted to iPad. Open the app's info.plist file. Add a new key for (something like) Main Nib Name(iPad). (Don't worry, Xcode will give you autocomplete options) Set it to this new .xib file. Now, when the app boots on an iPad, it'll load the new .xib. You can now write your code as normal.