iPad Tutorial for iOS: How To Port an iPhone Application to the iPad

An iPad tutorial that shows you how to port an iPhone application to the iPad. By Ray Wenderlich.

Leave a rating/review
Save for later
Share
You are currently viewing page 4 of 4 of this article. Click here to view the first page.

Final Notes

That’s all we’re going to do for this iPad tutorial, but for your reference, before you’d be able to submit this to the App Store, you’d need to do a couple more things:

  • Add default images for the iPad. You’ll need the Default.jpg like you normally would (this will be used on the iPhone). But now you’ll also need Default-Landscape.jpg and Default-Portrait.jpg for the iPhone screen size. The sizes of these images needs to be 1024×748 (landscape) and 768×1004 (portrait) – basically the size of the screen minus the status bar.
  • Add UISupportedInterfaceOrientations to your info.plist and add in all the orientations the app supports (for us, all of them!)
  • Add a 72×72 icon into the project to be used on the iPad, and create a new key CFBundleIconFiles to your info.plist, and put the names of both icons inside as an array. The OS will pick the appropriate icon based on size.

Gratuitous Tip

A tip for those of you porting your iPhone apps out there. Be really careful never to have two popover controllers visible at the same time – it’s confusing to users and your app will get rejected if you do (I know from experience, heh!)

The easy fix is just to dismiss any current popover controllers when you display another. But there’s a tricky case where you need to launch a popover controller from the left side of a split view – since the left side could itself be a popover in portrait mode!

For this case, a good fix is to call setContentViewController on your existing popover to replace its contents with what you *would have* put in the new popover such as follows:

[_sidebarPopoverController setContentViewController:
    wasGonnaBeInMySecondPopoverViewController animated:YES];

Where To Go From Here?

By this time you should have a firm grasp on the major tasks you’ll come across while porting an iPhone app to the iPad.

From here I’d recommend reading through Apple’s iPad Programming Guide, if you haven’t already. It discusses a lot of what we just covered above, as well as much more useful information!

Here is the sample project with the completed iPad port!

I’d be curious to hear about your experiences porting iPhone apps as well!