how can i transform an iPhone only app to an universal application? EDIT : FOUND SOLUTION If you want to have the "Upgrade current target to iPad" option selected, you must have Target Device Family set to iPhone only, not iPad/iPhone. It works for me!
If you want to do it manually, first create a dummy/template Universal app, look at the differences between it and your app, and change your app to eliminate those differences. Among the steps:
Create iPad subdirectories.
Create suitable xibs for the iPad in that subdirectory. Interface Builder has a menu item to convert generic .xibs automatically.
Modify your info.plist (add the NSMainNibFile~ipad key) to use an iPad xib for the iPad main window. Also add appropriate icons, etc. to this plist.
Either create new subclasses for the iPad, or use modify your existing subclasses to check the UI paradigm and select the appropriate UI subelements & sizes in code. You can check in code using something like:
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
...
} else {
... // iPhone stuff, etc.
}
If you created new classes, plug them into the iPad xibs as needed.
Modify all your Target settings to build for iPad and iPhone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With