Posts Tagged ‘universal app’

Tip: Going from a Universal to Single Device App

posted April 20th, 2012 in Development

We were recently asked to release the iPhone portion of a universal iOS app ahead of the full iPad part. This really isn’t difficult to do providing that you know the trick; however, judging from other posts that I’ve read, there seems to be some confusion surrounding this process.

The first and most obvious thing you need to change is a build setting. Select your project or target then go to build settings and search for the term “family”. You’ll be left with a setting called Targeted Device Family. Here you select the family you want. In our case we chose iPhone.

Now, if you run this on the iPad simulator the window will appear as though it is an iPhone app but your iPad application delegate will be executed. This probably isn’t what you were expecting. The less obvious change you need to make is this: Go into your applications info.plist and there you will see two rows named Main nib file base name. One will be for the iPhone and the other for the iPad. To get the proper application delegate to execute you need to remove the line for the iPad (in our case).

Now when you run your app on the iPad simulator the iPhone application delegate will run.