Starting an app from scratch
This tutorial assumes that you're creating a new iPad app (in particular, the DeepThoughts sample app) from scratch, using the Xcode templates to get started - which is certainly the fastest way to get started. The Seven Development Steps to iPad App Heaven should look something like this:
- Start with an Xcode template.
- Design the user interface.
- Write the code.
- Build and run your app.
- Test your app.
- Measure and tune your app's performance.
- Do it all again (or at least Steps 3-6) until you're done.
Remember: If you have an idea for a new iPad app, the decision to start from scratch should be obvious. But if you've already developed an iPhone/iPod touch app, you have choices in how you use Xcode to develop your iPad app.
Starting from an existing iPhone app
Besides the fact that iPhone apps already run on the iPad in "compatibility mode" (in a black box in the center of the display, or scaled up to full screen), you can also port the iPhone app - modify its code just a bit - to use iPad device resources. Xcode makes the porting process easier by automating much of the setup process for your project. The most noticeable difference between the iPad and iPhone, besides the absence of telephony, is the size of views you create to present your user interface.
Xcode simplifies the process of updating your existing iPhone project to include the necessary files to support the iPad. Essentially, you would be using a single Xcode project to create two separate apps: one for the iPhone (and iPod touch) and one for the iPad. After selecting the target in the Targets section of the Groups & Files list of the Xcode Project window, you can choose Project → Upgrade Current Target for iPad and then choose to either upgrade your iPhone target to one Universal application that supports both iPhone and iPad or create two device-specific applications (one for the iPad and one for the iPhone/iPod touch). Here are the differences to help you make that decision:
- A Universal application is optimized for all device types. Creating a Universal application allows you to sell one app that supports all device types. This choice makes the download experience simpler for users. (You can set one price, and users can use the same copy of the app on both their iPhone and iPad.)
- Device-specific applications are designed specifically for the device - iPhone (and iPod touch) or iPad. It gives you the advantage of reusing code from your existing iPhone app while also taking less development and testing time than developing a Universal app.
You also have the choice of using separate Xcode projects to create separate apps for the iPad and iPhone. Essentially, this means starting from scratch. (See the later section "Starting an app from scratch.") If you have to rewrite large portions of your code anyway, creating a separate Xcode project for the iPad is usually simpler. Creating a separate project gives you the freedom to tailor your code for the iPad without having to worry about whether that code runs on other devices. If your app's data objects are tightly integrated with the views that draw them, or if you just need the freedom to add more features to the iPad version, this is the way to go.
Whether you create device-specific application targets in one project or create separate projects, you still end up with two separate apps to manage. The only way to have only one app to manage for both iPhone and iPad is to create a Universal app.
In this tutorial, you start at the very beginning, from scratch, with the very first step, which is Xcode. And the first step of the first step is to create your first project.