Having issues with building without letterboxing on iPhone 5

Hi all!

I’ve read the blog posts and a number of the other forums about building on iPhone 5 so it doesn’t letterbox. I created the Default–568h@2x.png and placed it in the main directory. I tried the image flipped both horizontally and vertically but neither work.

I also added this to my plist in build.settings

UILaunchImageFile = "Default",  

This is my config.lua file:

application = {  
 content = {  
 width = 767,  
 height = 1023,   
 scale = "zoomEven",  
 fps = 60,  
  
 imageSuffix = {  
 ["@2x"] = .6,  
 ["@4x"] = 1.8  
 }  
 }  
}  

I set my resolution to 767 x 1024 because for some reason, if I set to standard iPad resolution of 768x1024, it doesn’t recognize the @2x signifier and loads my graphics at original 1x resolution, so setting it one pixel less seemed to fix it.

I noticed most of the config.lua files are set up for original iPhone res, 320x480, but my whole game was built around the iPad resolution, so changing it means I have to go back through all of the code to fix it (and the physics would be off). Is there something I’m missing?

Thanks!
David [import]uid: 112953 topic_id: 31881 reply_id: 331881[/import]

Anybody have a solution to this? [import]uid: 112953 topic_id: 31881 reply_id: 127487[/import]

Anybody have a solution to this? [import]uid: 112953 topic_id: 31881 reply_id: 127487[/import]

Hi,

I have a similar issue.

I created the Default–568h@2x.png with size 640x1136, place in in the main directory.

However much I try to play around with Xcode, I cannot get the simulator to recognise the file and switch to tall mode. BTW I am using the following config.lua:

application =   
{  
 content =   
 {   
 width = 320,  
 height = 480,   
 fps = 30  
 }  
}  

and the following build.settings:

settings =  
{  
  
 orientation =  
 {  
 default = "landscapeRight",   
 supported = { "landscapeLeft", "landscapeRight" },  
 },  
  
 iphone =  
 {  
 plist =  
 {  
 CFBundleIconFile = "Icon.png",  
 CFBundleIconFiles = {  
 "Icon.png",   
 "Icon@2x.png",   
 "Icon-72.png",   
 },  
 --UIApplicationExitsOnSuspend = true,  
 UIStatusBarHidden = true,  
 CoronaUseIOS6LandscapeOnlyWorkaround = true,  
 },  
 components = {}  
 }  
}  

Help?!!

Anthony [import]uid: 87194 topic_id: 31881 reply_id: 127907[/import]

This may only be somewhat helpful but what I gathered from other posts and my own experience is adding the new Default png is not enough for the iPhone 5 to kick into full screen mode even though that is what Corona’s blog says. You have to fiddle with your height setting in you config until Corona forces it to switch on the device. I don’t like it that way because if you already designed it for a 320x480 or 640x960 then you will have to rewrite some code to get objects where you want them and to work as expected.

Now some posts show you need to bump 320x480 up to 320x568. While if your doing 640x960 you would bump it to 640x1136. Also people seem to be doing this by splitting there config with an if statement so the larger height is only used when it’s on the iphone 5. For me I just bumped it from 640x960 to 640x962. Just being 2 pixels larger seemed to kick in the iphone 5’s full screen. It didnt affect much of anything in my app being 2 pixels off. Luckily most of my objects are center based but those that are going off the top or bottom of the screen do not seem misplaced with only being 2 pixels higher or lower.

Now your also using dynamic images and zoomEven where I am using letterBox and no dynamic images. Getting a height that kicks in the iPhone 5 and also dynamically loads the right images will require even more fiddling.

In a nutshell I am disappointed we have to change our content size to force iPhone 5 to go full screen. I would of rather had it work where Corona kept our content size but forced the iPhone 5 into tall mode on it’s own if the new Default png was found. That is how it was described. [import]uid: 56820 topic_id: 31881 reply_id: 127917[/import]

anderoth,

Thanks, that is very helpful! I shall give is a go, though fiddling with screen sizes may be too late for the app I’m about to release.

Cheers,
Anthony [import]uid: 87194 topic_id: 31881 reply_id: 127918[/import]

I have my build working with the iPhone 5 now, but I am still having trouble loading the proper image with dynamic resolution.

Anyone figure out how to make the proper image load? Thanks! [import]uid: 71971 topic_id: 31881 reply_id: 127939[/import]

@anderoth, I was hoping this wasn’t the case. Since I started out as tablet as a base, it’s already a lot wider than the phone is. I wonder if all it cares about is screen ratio size or actual pixel dimensions. Will have to do some more testing [import]uid: 112953 topic_id: 31881 reply_id: 127953[/import]

Hi,

I have a similar issue.

I created the Default–568h@2x.png with size 640x1136, place in in the main directory.

However much I try to play around with Xcode, I cannot get the simulator to recognise the file and switch to tall mode. BTW I am using the following config.lua:

application =   
{  
 content =   
 {   
 width = 320,  
 height = 480,   
 fps = 30  
 }  
}  

and the following build.settings:

settings =  
{  
  
 orientation =  
 {  
 default = "landscapeRight",   
 supported = { "landscapeLeft", "landscapeRight" },  
 },  
  
 iphone =  
 {  
 plist =  
 {  
 CFBundleIconFile = "Icon.png",  
 CFBundleIconFiles = {  
 "Icon.png",   
 "Icon@2x.png",   
 "Icon-72.png",   
 },  
 --UIApplicationExitsOnSuspend = true,  
 UIStatusBarHidden = true,  
 CoronaUseIOS6LandscapeOnlyWorkaround = true,  
 },  
 components = {}  
 }  
}  

Help?!!

Anthony [import]uid: 87194 topic_id: 31881 reply_id: 127907[/import]

This may only be somewhat helpful but what I gathered from other posts and my own experience is adding the new Default png is not enough for the iPhone 5 to kick into full screen mode even though that is what Corona’s blog says. You have to fiddle with your height setting in you config until Corona forces it to switch on the device. I don’t like it that way because if you already designed it for a 320x480 or 640x960 then you will have to rewrite some code to get objects where you want them and to work as expected.

Now some posts show you need to bump 320x480 up to 320x568. While if your doing 640x960 you would bump it to 640x1136. Also people seem to be doing this by splitting there config with an if statement so the larger height is only used when it’s on the iphone 5. For me I just bumped it from 640x960 to 640x962. Just being 2 pixels larger seemed to kick in the iphone 5’s full screen. It didnt affect much of anything in my app being 2 pixels off. Luckily most of my objects are center based but those that are going off the top or bottom of the screen do not seem misplaced with only being 2 pixels higher or lower.

Now your also using dynamic images and zoomEven where I am using letterBox and no dynamic images. Getting a height that kicks in the iPhone 5 and also dynamically loads the right images will require even more fiddling.

In a nutshell I am disappointed we have to change our content size to force iPhone 5 to go full screen. I would of rather had it work where Corona kept our content size but forced the iPhone 5 into tall mode on it’s own if the new Default png was found. That is how it was described. [import]uid: 56820 topic_id: 31881 reply_id: 127917[/import]

anderoth,

Thanks, that is very helpful! I shall give is a go, though fiddling with screen sizes may be too late for the app I’m about to release.

Cheers,
Anthony [import]uid: 87194 topic_id: 31881 reply_id: 127918[/import]

I have my build working with the iPhone 5 now, but I am still having trouble loading the proper image with dynamic resolution.

Anyone figure out how to make the proper image load? Thanks! [import]uid: 71971 topic_id: 31881 reply_id: 127939[/import]

@anderoth, I was hoping this wasn’t the case. Since I started out as tablet as a base, it’s already a lot wider than the phone is. I wonder if all it cares about is screen ratio size or actual pixel dimensions. Will have to do some more testing [import]uid: 112953 topic_id: 31881 reply_id: 127953[/import]

Same problem here, only putting the (correctly named) new Default image into the project didn’t help at all, I tested this right now and now I’m sitting here in front of my new iPhone 5 and I’m NOT happy - I wanted to upload the game in three days.

This is a showstopper, because otherwise the app looks great on all android devices using a similar aspect ratio as the iPhone 5, so it would be stupid not to use the full resolution of 640x1136.

HELP!

Best,
Andreas
[import]uid: 133261 topic_id: 31881 reply_id: 128897[/import]

Go find the blog posts on this.

You have to detect if you are a “tall” device and offer an 640x1136 ratio layout option. (ergo, 320x568)

Here is one I’m using for an app.

[code]
local isTall = ( “iPhone” == system.getInfo( “model” ) ) and ( display.pixelHeight > 960 )

if isTall then

application =
{
content =
{
width = 320,
height = 568,
scale = “letterbox”,
xAlign = “center”,
yAlign = “center”,
imageSuffix =
{
["@2x"] = 1.5,
["@4x"] = 3.0,
},
},
notification =
{
iphone = {
types = {
“badge”, “sound”, “alert”
}
}
}
}

else

application =
{
content =
{
width = 320,
height = 480,
scale = “letterbox”,
xAlign = “center”,
yAlign = “center”,
imageSuffix =
{
["@2x"] = 1.5,
["@4x"] = 3.0,
},
},
notification =
{
iphone = {
types = {
“badge”, “sound”, “alert”
}
}
}
}

end
[/code] [import]uid: 19626 topic_id: 31881 reply_id: 128917[/import]

@robmiracle has the correct solution! This has worked for me as well and have had no issues. [import]uid: 71971 topic_id: 31881 reply_id: 128920[/import]

Thanks,

but the Layout for 640x1136 is working fine, I stumbled about the same problem as Naomi, I copied the filename for the tall splash png from the blog post, and this filename will look ok, but won’t work:

https://developer.coronalabs.com/forum/2012/10/25/iphone-5-ipod-touch-5g-tall-mode-doesnt-kick-device#comment-form

As soon as I typed the filename myself it worked fine.

Best,
Andreas
[import]uid: 133261 topic_id: 31881 reply_id: 128925[/import]

@Andreas Thanks! That worked. Changed the name of the splash image and it registered as iPhone 5 in the simulator, without having to change anything in my config.lua file. AWESOME!

-David [import]uid: 112953 topic_id: 31881 reply_id: 128934[/import]

David, if you do not change the config.lua, the app will use all the real-estate visually but the extra area at the top is not active. That is no touch events happen in the top area. If you want to do more than just fill the area with art then you need the config.lua changes as well.

[import]uid: 19626 topic_id: 31881 reply_id: 128950[/import]

Same problem here, only putting the (correctly named) new Default image into the project didn’t help at all, I tested this right now and now I’m sitting here in front of my new iPhone 5 and I’m NOT happy - I wanted to upload the game in three days.

This is a showstopper, because otherwise the app looks great on all android devices using a similar aspect ratio as the iPhone 5, so it would be stupid not to use the full resolution of 640x1136.

HELP!

Best,
Andreas
[import]uid: 133261 topic_id: 31881 reply_id: 128897[/import]