When first creating Nerdfeed, we chose to go with an iPad-only application. Now, you’re going to turn it into a universal application. Select the Nerdfeed
project from the project navigator. In the editor area, choose the Nerdfeed target and then the Summary tab.
Figure 26.5 Universalizing Nerdfeed
From the Devices pop-up menu,
choose Universal. A sheet will appear asking if you want to copy and convert MainWindow.xib.
Choose No.
Figure 26.6 Changing simulators
That’s all there is to it – the application is now universal. You can test it by building and running again on one simulator and then the other.
There are two reasons the universalization process was so easy for Nerdfeed. Remembering these reasons will help you
when you’re writing your own applications.
As we built Nerdfeed, we were mindful of the device differences in the classes we used. For example, knowing that
a UISplitViewController doesn’t exist on the iPhone or iPod touch, we made sure that there was an alternative interface on those devices.
In general, when using an Apple-provided class, you should read the discussion in the documentation about that class. It will give you tips
about the availability of the class and its methods on the different devices.
Nerdfeed is still a relatively simple application. It is always easier to universalize an application early
in development. As an application grows, its details get buried in the massive pile of code. Finding and fixing issues
as you’re writing code is much easier than coming back later. Details are harder to find, and there is the risk of breaking what already works.