Check if iPhone version running on iPad?

Okay this should be in the "Non Universal Binaries" section, but I didn't see one, so bear with me.

I have an app that has some different interface functionality depending on if it's an iPhone (small screen) or an iPad (big screen) and I am going to release the two versions as separate apps (business decision, please don't attack me for it). Since there is no reasonable way to block an iPhone only app from running on the iPad (compatibility mode) I'd like to know when someone is running the iPhone version and have the app show the appropriate interface.

Suggestions?

You should be able to use the following to detect whether or not it is running on an iPad.

system.getInfo("model") == "iPad"

I see the sense in releasing two versions, I've done that more often than Universal builds :)

Peach

In my experience, system.getInfo("model") returns "iPad" when it is on the iPad device regardless of whether it's running the iPhone version or iPad version of the app. I'm looking for a way to decide which version of the app is running on the iPad, something similar to UIUserInterfaceIdiomPhone vs. UIUserInterfaceIdiomPad.

Thanks again.

views:1303 update:2011/10/10 15:46:04
corona forums © 2003-2011