The Xcode IOS simulator Vs Corona simulator (iphone 5)

Hey guys,

I am trying to figure why the Corona simulator seems to not trigger the tall iphone 5 but the Mac xcode IOS simulator do?

It seems that the Corona simulator (both PC and Mac) do not load the high res images (@2x) but the IOS simulator do. Since I do not have a iphone 5 device to try it on I cannot tell if my app is really compatible with the iphone5. I would assume that if the IOS simulator shows the app is ok on the iphone 5, it will be good on a real device but it is just an assumption on my part.

Any suggestions?

Thanks guys.

Mo

Here my current config.lua Please note that I had to leave the iPad dimension the same a iphone because if not the most images are shown very small ( width = 320,height = 480)

[lua]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 = 30,
antialias = false,
audioPlayFrequency = 44100,
xalign = “center”,
yalign = “center”,
imageSuffix =
{
["@2x"] = 2,
},
},
}

elseif isTall == true then

application =
{
content =
{
width = 320,
height = 568,
fps = 30,
antialias = false,
audioPlayFrequency = 44100,
xalign = “center”,
yalign = “center”,

},
}

elseif targetDevice == “iPad” then

application =
{
content =
{
width = 384,
height = 512,
scale = “letterbox”,
fps = 30,
antialias = true,
audioPlayFrequency = 44100,
xalign = “center”,
yalign = “center”,
imageSuffix =
{
["@2x"] = 2,
},
},
}
end[/lua] [import]uid: 100814 topic_id: 32638 reply_id: 332638[/import]

The reason it doesn’t work in the Mac simulator is because the following is missing from the “isTall = true” section:

 scale = "letterbox",  
 imageSuffix =   
 {  
 ["@2x"] = 2,  
 },   

Without the “scale” parameter, no dynamic scaling is used. The “@2x” is needed to use the 2x images.

Your config.lua has another problem running in the Xcode Simulator because the “model” is not “iPhone” but “iPhone Simulator” and “iPad Simulator”, so none of your configuration code will excite.

The final problem is iOS (Xcode simulator and device) doesn’t return display.pixelHeight > 960 unless there is a “tall mode” splash screen. (You may have that in your project but you didn’t mentioned it in your post). The Mac and Windows Corona Simulators always return the 1136 pixels for height (the lack of a “tall mode” splash screen is ignored).

You can read more about the iPhone5 “tall mode” here. http://www.coronalabs.com/blog/2012/09/19/faq-wednesday-iphone-5-and-ios-6/ (question #3) [import]uid: 7559 topic_id: 32638 reply_id: 130076[/import]

The reason it doesn’t work in the Mac simulator is because the following is missing from the “isTall = true” section:

 scale = "letterbox",  
 imageSuffix =   
 {  
 ["@2x"] = 2,  
 },   

Without the “scale” parameter, no dynamic scaling is used. The “@2x” is needed to use the 2x images.

Your config.lua has another problem running in the Xcode Simulator because the “model” is not “iPhone” but “iPhone Simulator” and “iPad Simulator”, so none of your configuration code will excite.

The final problem is iOS (Xcode simulator and device) doesn’t return display.pixelHeight > 960 unless there is a “tall mode” splash screen. (You may have that in your project but you didn’t mentioned it in your post). The Mac and Windows Corona Simulators always return the 1136 pixels for height (the lack of a “tall mode” splash screen is ignored).

You can read more about the iPhone5 “tall mode” here. http://www.coronalabs.com/blog/2012/09/19/faq-wednesday-iphone-5-and-ios-6/ (question #3) [import]uid: 7559 topic_id: 32638 reply_id: 130076[/import]

Hello Tom,

Thank you very much. I actually took the config from:

http://developer.coronalabs.com/code/ios-universal-app-template-supports-iphone-iphone-5-ipad

And yes, I finally figured out that I needed the “iphone/ipad simulator” conditions. Thank you for confirming this. Yes I do have a tall background image.
Thanks again.

Mo

[import]uid: 100814 topic_id: 32638 reply_id: 130237[/import]

Hello Tom,

Thank you very much. I actually took the config from:

http://developer.coronalabs.com/code/ios-universal-app-template-supports-iphone-iphone-5-ipad

And yes, I finally figured out that I needed the “iphone/ipad simulator” conditions. Thank you for confirming this. Yes I do have a tall background image.
Thanks again.

Mo

[import]uid: 100814 topic_id: 32638 reply_id: 130237[/import]