Determine if app is running on iPhone, iPhone4 or iPad

Is there a way to determine if the app is running on an iPhone, iPhone 4 or iPad?

From the docs, the command system.getInfo( “deviceID” ) wil tell me whether I’m running on an iPhone or iPad, but will not distinguish between iPhone or iPhone 4. [import]uid: 6942 topic_id: 10165 reply_id: 310165[/import]

I use a screen size detection at the beginning of the main.lua file.

if (display.contentWidth \> 480) then iPad = true elseif (display.contentWidth == 480) then 4G = true else 3G = true end [import]uid: 9492 topic_id: 10165 reply_id: 37128[/import]

Thanks, but my build settings will always cause the width and length of the content size to be the same for all devices. But maybe if there is a way to get the actual screen size that would work. [import]uid: 6942 topic_id: 10165 reply_id: 37129[/import]

local isPad = “iPad” == system.getInfo( “model” )

it will gives true if device is ipad and false if any other similarly for,

local iPhone4 = “iPhone4” == system.getInfo( “model” )
local iPhone = “iPhone” == system.getInfo( “model” )

cheers :slight_smile: [import]uid: 12482 topic_id: 10165 reply_id: 37131[/import]

I agree with Synthesis above; I do a manual contentwidth confirmation and then force it to iPhone4. Works perfectly. I’m more concerned about the Android platform because my understanding is that resolution of Android devices can cover the spectrum of resolutions…? True? [import]uid: 74844 topic_id: 10165 reply_id: 49772[/import]