Corona SDK: Config.lua template for iPhone/iPad & iPhone 5

So here is a snippet of code for Corona SDK that I am using to upgrade Joke Shake for the iPhone 5.

It is quite basic, it sets a few local variables that work out the device model that is running the application (iPhone or iPad) and then works out if the device is an iPhone, is it true or false that the pixel height is larger then 960 (the iPhone 4/4s pixel height).

When programming for the iPhone 5, it is identical to the iPhone 4, with exception of 88 pixels added to the height either side of the display (using the code below, thats 44 corona 'display points').

You can find this also posted as a gist on my github account, fork away!

local targetDevice = ( system.getInfo( "model" ) ) 
local isTall = ( "iPhone" == system.getInfo( "model" ) ) and ( display.pixelHeight > 960 )

if isTall == false and targetDevice == "iPhone" then
application =
{
content =
{
width = 320,
height = 480,
scale = "letterbox",
fps = 60,
antialias = true,
xalign = "center",
yalign = "center",
imageSuffix =
{
["@2x"] = 2,
},
},
}

elseif isTall == true then
application =
{
content =
{
width = 320,
height = 568,
fps = 60,
antialias = true,
xalign = "center",
yalign = "center",
},
}

elseif targetDevice == "iPad" then
application =
{
content =
{
width = 768,
height = 1024,
scale = "letterbox",
fps = 60,
antialias = true,
xalign = "center",
yalign = "center",
imageSuffix =
{
["@2x"] = 2,
},
},
}
end
Source: https://gist.github.com/3751257