views:

63

answers:

3

Which part of the app is it that "triggers" the iPad app as it's own app as opposed to running the iPhone version in a universal binary?

What do I need to change to make my app Universal, after clicking "Upgrade current Target for iPad"? My app runs on outside of the simulator, but my images are too small and my text is out of place. What am I missing here?

To the opposite end, how do I force my Universal app to run as an iPhone app inside the simulator on the iPad? (When changing "Target Device Family", it will run the iPad version of the app in the simulator, but not the iPhone version.)

EDIT:

It seems to me that these questions kind of complement each other. While I suspect it's the same mechanism at work in both situations, I'm not sure what it is, or how it works.

A: 

You need to re-code the app for the iPad to lay out your text and images how you want them when it is running on an iPad.

To make it run as an iPhone app you stop it being Universal.

invariant
My second question is - where do you stop it from being universal? The Build configuration doesn't help. As I said, it just makes the app run in the simulator.
Moshe
A: 

The build setting is called Target Device Family

That's where it starts.

If you wrote a universal app and you want to force the iPhone mode on the iPad you switch Target Device Family to iPhone only and it will ignore everything else.

Jasconius
This only makes the iPad app run inside of the iPhone simulator.
Moshe
Make sure you remove the app from the device and clean all targets before going about it. I find that the PList can be finicky to changes especially on device.
Jasconius
A: 

There are keys in the info.plist file put there by the Targeted Device Family setting. The iPad looks for those plist keys to determine whether to launch as a Universal app or in iPhone emulation mode, and which idiom's xib files to use for app launch.

Added: If you don't have, and specify in the plist, a .xib file suitable for the iPad idiom, then one with the wrong UIWindow frame is used, which ends up in the upper left corner.

hotpaw2
What keys are those?
Moshe
Bingo! We have a winner. Thanks.
Moshe