Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

How can I recognize if the player device is an iPad or an iPhone?

Now I can do it by checking the viewport size. But I think is just a tricky way, is there any other, more standard way?

share|improve this question
    
I guess Screen Resolution size is the only way rite now to differentiate the hardware –  ammar26 Oct 22 '12 at 5:15
add comment

1 Answer

up vote 0 down vote accepted

To detect what platform you're runnning on from UnrealScript, you'd typically use:

if( class'WorldInfo'.static.IsConsoleBuild(CONSOLE_Something) )
{
    // do something platform-specific
}

Unfortunately, Unreal doesn't make a distinction between the different kinds of iOS devices (they're all CONSOLE_IPhone), so you're out of luck.

Also, when submitting an app to the Apple Store, you only have one build for all devices: you won't be able to do it manually by making two different builds.

This is probably for a very good reason (Apple trying to keep compatibility between device types and iterations?), so double check that you really want to make a distinction. And if it's really the case, yes, you'll have to use some heuristic of yours, such as the display resolution.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.