The Default-568h@2x.png file affects Apple rejecting your app and not being able to use the full screen. If you are not able to install an AdHoc version on the iPhone 5, we would need to see the error message you are getting but likely the cause is you have not added that device to your Provisioning Portal and updated you provisioning profile with that device and downloaded the latest version of that profile.
This great, thanks for sharing all of the work you have put into this askStudios.
I’d like to clarify the background image dimensions.
360 by 570 for older devices iPhone
720 by 1140 for @2x for iPhone 5
1440 by 2280 for higher resolution screens?
The blog post covering this topic, mentions 800 by 1200, and 900 by 1425, which don’t make any sense to me. What am I missing?
When we suggested moving to 800x1200, it was with the idea that Android was just as important as iOS and that there were no 320x480 devices to build for any more (okay they are still out there, but are quickly going away). It does not make sense to think in pixels and with most screens being larger an 800x1200 content area makes sense. Its easy to work with as everything is divisible by 4, even numbers, etc. But the widget library is based on 320x480, so we kind of had to back track on that suggestion. Now that Apple as come out with these new devices, they have made it quite clear that we still need to think in content area points based off of a 320 x 480 content area and let dynamic scaling (i.e. @2x and @4x) sizes do what they are supposed to do.
We are likely going to revise that suggestion to go back to the 320x point size.
Now as far as the 900 x 1425 those numbers work out math wise. For instance the 360x570 is 1.125 * 320 larger on the width. 800 * 1.125 = 900. 570 is 1.1875 times larger than 480, so to scale this, 1200 * 1.1875 is 1425. That’s where those numbers come from.
But if you use widgets you should stay at 320x480. And for now, because of Apple’s way of thinking, that is becoming more sound advice.
My second day with Corona but I must be missing something.
The image is 1200x800 but this is what I end up with on the iPhone simulator:
-- build.settings settings = { orientation = { default = "landscapeRight", supported = { "landscapeRight","landscapeLeft" }, }, } -- config.lua --calculate the aspect ratio of the device local aspectRatio = display.pixelHeight / display.pixelWidth print (aspectRatio) application = { content = { width = aspectRatio \> 1.5 and 800 or math.ceil( 1200 / aspectRatio ), height = aspectRatio \< 1.5 and 1200 or math.ceil( 800 \* aspectRatio ), scale = "letterBox", fps = 30, imageSuffix = { ["@2x"] = 1.3, }, }, } print(application.content.width) print(application.content.height) -- main.lua display.setStatusBar(display.HiddenStatusBar) local background=display.newImage("images/bgd.png") background.x=display.contentWidth/2 background.y=display.contentHeight/2
The terminal output is 1.5, 800, 1200
Have found the answer … it should be newImageRect NOT newImage. All working fine now. Very impressed with lua and Corona.
This great, thanks for sharing all of the work you have put into this askStudios.
I’d like to clarify the background image dimensions.
360 by 570 for older devices iPhone
720 by 1140 for @2x for iPhone 5
1440 by 2280 for higher resolution screens?
The blog post covering this topic, mentions 800 by 1200, and 900 by 1425, which don’t make any sense to me. What am I missing?
When we suggested moving to 800x1200, it was with the idea that Android was just as important as iOS and that there were no 320x480 devices to build for any more (okay they are still out there, but are quickly going away). It does not make sense to think in pixels and with most screens being larger an 800x1200 content area makes sense. Its easy to work with as everything is divisible by 4, even numbers, etc. But the widget library is based on 320x480, so we kind of had to back track on that suggestion. Now that Apple as come out with these new devices, they have made it quite clear that we still need to think in content area points based off of a 320 x 480 content area and let dynamic scaling (i.e. @2x and @4x) sizes do what they are supposed to do.
We are likely going to revise that suggestion to go back to the 320x point size.
Now as far as the 900 x 1425 those numbers work out math wise. For instance the 360x570 is 1.125 * 320 larger on the width. 800 * 1.125 = 900. 570 is 1.1875 times larger than 480, so to scale this, 1200 * 1.1875 is 1425. That’s where those numbers come from.
But if you use widgets you should stay at 320x480. And for now, because of Apple’s way of thinking, that is becoming more sound advice.
My second day with Corona but I must be missing something.
The image is 1200x800 but this is what I end up with on the iPhone simulator:
-- build.settings settings = { orientation = { default = "landscapeRight", supported = { "landscapeRight","landscapeLeft" }, }, } -- config.lua --calculate the aspect ratio of the device local aspectRatio = display.pixelHeight / display.pixelWidth print (aspectRatio) application = { content = { width = aspectRatio \> 1.5 and 800 or math.ceil( 1200 / aspectRatio ), height = aspectRatio \< 1.5 and 1200 or math.ceil( 800 \* aspectRatio ), scale = "letterBox", fps = 30, imageSuffix = { ["@2x"] = 1.3, }, }, } print(application.content.width) print(application.content.height) -- main.lua display.setStatusBar(display.HiddenStatusBar) local background=display.newImage("images/bgd.png") background.x=display.contentWidth/2 background.y=display.contentHeight/2
The terminal output is 1.5, 800, 1200
Have found the answer … it should be newImageRect NOT newImage. All working fine now. Very impressed with lua and Corona.