Question

I'm working on an iPhone app, and decided to look into making it universal. If I set my build settings to target iphone/ipad, a lot of sizes and alignments get buggered (as I expected), and just generally it doesn't look good.

If I only target iPhone, but run it on the iPad, and hit the 2x button, it looks great. I'd like to release my app on the app store for the iPad, despite leaving the targeted platform as the iPhone since it looks and works much better.

I'm wondering if that will be an issue when I submit? Can you only release apps for iPad on the store if they target iPad?

Thanks!

Was it helpful?

Solution

If you target the iPhone (so that it will appear in 1x/2x mode on the iPad) it will only appear in the iPhone App Store.

iPad Users will still be able to download the app, but it will be in the iPhone Apps section.

iPad App Store. See the iPhone App Section on the bottom

So unless you explicitly target the iPad, it won't appear on the iPad store. You could consider redoing the graphics and alignments for the iPad app and sell it as a HD app.

If you need it to be universal look at doing something like this:

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
    controller = [[MyController alloc] initWithNibName:@"MyiPadNib" bundle:nil];
else
    controller = [[MyController alloc] initWithNibName:@"MyiPodNib" bundle:nil];

OTHER TIPS

If you develop for the iPhone you will want to use interface "xib" files that have all the correct sizing for the iPhone/iPod. iPad will be allowed to use the application

In your plist you will have the option of giving a startup xib file [NSMainNibFile] for the application to start with.

Or you can alternatively include [NSMainNibFile~ipad] and compile it for Universal. This will tell the ios that it should open NSMainNibFile for the iPhone/iPod and should open NSMainNibFile~ipad for the iPad.

There are a number of other settings that would need to be set for the ipad's icon, default screen among other items. But the Nib file settings are the most needed.

then you have separate xib file's for each platform. Conforming to the Model-View-Controller setup it would be relatively simple to attach your new view(xib) to your existing controller(.h/.m) and wire up a new look to your code and make an entirely new app..

Some sections of code will need to be changed dependent on weather you are on the iPad or the iPod. (e.g. Layout, Special iPad/iPod only features etc.)

Here is the code I use do determine if I am on the iPad.

#define IS_IPAD() ([[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)] ? \
[[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad : NO)

Some developers dont comply totally with the MVC paradigm so your project may require some retooling to be able to function on both platforms. But if you are able to pinpoint the places that differentiate from one platform to another then your application will be able to function seamlessly on both platforms. (Likely with a better layout on the iPad as there is more real estate do play with when laying out your controls)

Alternatively if you want the application to be iPhone style but run on the iPad, It already does that by default.

You application will only be viewable in the iPad section of the store if it specifically targets iPad (is either iPad only, or a universal application).

What you are talking about is an iPhone application running on an iPad: where you are opting to only target iPhone devices. These apps will not be shown in the iPad section of the store.

Think of it as an incentive by Apple to get you to design an app that behaves well on iPad and iOS.

Remember, iPad users can still download iPhone only apps through the store, they're just in a separate section.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top