App Looks Great In Corona Iphone 5 Simulator, Looks Un-Optimized In Xcode And Actual Iphone 5.

Hi Niles,

I notice you misspelled the “scale” parameter. It should be “zoomStretch” (lowercase “z”), not “ZoomStretch”. Please test that out and see what happens.

Brent

No change.  It’s always been capital Z in my past builds and worked.  I tried it just to see.  No change.

iPhone:

2013-04-27 21:50:22.140 Corona Simulator[23245:707] 1 1
 

iPhone 4:

2013-04-27 21:53:32.960 Corona Simulator[23245:707] 2 2
 

iPhone 5:

2013-04-27 21:53:36.464 Corona Simulator[23245:707] 2 2.3666666690177
2013-04-27 21:53:36.467 Corona Simulator[23245:707] WARNING: Due to system limitations, display.newText() height is going to be increased to nearest multiple of 4: 1183 ===> 1184.

Corona on left, Xcode simulator on right.

Text looks good in Corona simulator, then looks un-optimized for iPhone 5 on Xcode or device.

Hi Niles,

Thanks for the info. Can you please test this using just one line of text? In other words, don’t specify a width and height parameter in the newText() call. I’d like to see if this is a factor of a multi-line text box, or something else.

[lua]

local text1 = display.newText( “testingTESTING”, 66, 60, “Arial”, 60 )

[/lua]

Best regards,

Brent

For iPhone 5

2013-04-28 20:54:44.635 Corona Simulator[45723:707] 2 2.3666666690177
2013-04-28 20:54:44.635 Corona Simulator[45723:707] 2 2.3666666690177

No longer optimized for iPhone 5 in Corona Simulator.  Attaching pic.

In the first .tiff you posted, it looks like the iPhone 5 is not recognizing the Default-568h@2x.png file.  If you copied the name from our blog post, then the dash was being converted to a fancy n-dash and that won’t work. 

If you have other Default.png files, why not drop some graphics on the Default-568h@2x.png file to make sure you see that file show when your app boots up on your iPhone 5.

Took the dash out and typed it back in.

No change.

Hi Niles,

What happens when you put this test print value in main.lua?

[lua]

print(1/display.contentScaleX, 1/display.contentScaleY)

[/lua]

Then change (in the Simulator) from iPhone to iPhone4 to iPhone5? Can you show me which numbers are output in the Terminal?

Also, could you attach a screenshot of what the “unoptimized” output looks like?

Thanks,

Brent

Hi Niles,

Can you post your basic code (for the scene) here? Just the part where you display the green text, and maybe one of the white “button” boxes below. I don’t need to see the entire project code.

Also, can you attach your full config.lua to this post?

Thanks,

Brent

Config.lua

launchPad = false

application = {
content = {
  width = 320,
  height = 480,
  scale = “zoomStretch”,
  fps = 30,
}
}

Code for scene:

title = display.newText( “You awaken in a desert.  It is morning, and although you are still cold from the night, you know that it will soon reach inhospitable temperatures.  All around you is endless desert expanse, except to the east, where there appears to be a town.”, 0, 0, 320, 500, native.systemFont, ts )
title:setTextColor( r, g, b )

 
local northbutton = display.newRect(0, 0, 76, 30, 4)
northbutton.strokeWidth = 2
northbutton:setFillColor(0)
northbutton.x = display.contentWidth / 2
northbutton.y = display.contentHeight - 160

Hi Niles,

OK, I’m doing a bit of testing with this. But may I ask, when you mean “unoptimized”, do you mean that the text on the phone isn’t going “flush” to the (taller) top of the iPhone5? Or is there something else that I’m just not seeing in the screenshots?

Would you be open to using a different scale method than “zoomStretch” if I provided an alternative? That’s generally not a scale mode that I recommend to anybody, even a text-based app.

By the way, the “launchPad” setting in the config should go within the application table, not outside it. Just an FYI.

Brent

Yes, it isn’t going flush to the taller iPhone 5 screen.  Ironically, it does in the Corona Simulator.

Yes,  i’m open to anything the works.

This is 99% likely to be a problem with your Default-568h@2x.png file.  Can you email it to me at:

rob AT coronalabs DOT com (putting an @ and . in the right places) and let me take a look at your image and see if there is something amiss?

Sent

You are not going to believe this one…  The file name needs to be:

Default-568h@2x.png

 

not:

Default-568h@2x. PNG

 

Just rename the extension to lower case .png and your problem should be fixed.

That was it!

So weird!

Filenames on devices are case sensitive, not so on the Mac

iPhone:

2013-04-27 21:50:22.140 Corona Simulator[23245:707] 1 1
 

iPhone 4:

2013-04-27 21:53:32.960 Corona Simulator[23245:707] 2 2
 

iPhone 5:

2013-04-27 21:53:36.464 Corona Simulator[23245:707] 2 2.3666666690177
2013-04-27 21:53:36.467 Corona Simulator[23245:707] WARNING: Due to system limitations, display.newText() height is going to be increased to nearest multiple of 4: 1183 ===> 1184.