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

I am trying to update my app for the new iPhone 5 screen.  I use Zoom Stretch, since my app is text only…and this works great for me across multiple platforms.  On the Corona simulator under iPhone 5, it looks optimized for the longer screen.  However, if you run the compiled app on the Xcode simulator, or on the actual iPhone 5, it looks like an older, un-optiimised app.  (pre-iPhone 5 apps).

What gives?

Hi @nilesmitchell,

This is caused by omitting a “tall” launch image from the project, something that Apple started requiring when the iPhone5 launched. It’s a common oversight and I see this issue mentioned twice a week or more. :wink:

See here:

http://docs.coronalabs.com/guide/distribution/buildSettings/index.html#launchimage

This will fix the issue you describe; just include that image, even if it’s a solid black rectangle for the time being.

Best regards,

Brent Sorrentino

Brent,

Still a no-go!  I added a 640 × 1136 PNG display image and named it Default-568h@2x.png.  I still have the same problem as before.  Any ideas?

Niles

Hi Niles,

Have you experimented with the other scale factors? Zoom Stretch isn’t a very “popular” one, but if it works for you, then that’s fine. I’m just curious if you’ve tried “zoomEven” or “letterbox”. Also, did you read through the following guide about working with multiple devices? Many people have found this useful, or at least as a launchpad for building their config setup:

http://www.coronalabs.com/blog/2012/12/04/the-ultimate-config-lua-file/

Brent

It was a year ago when I wrote the app, so I don’t remember all the details, but ZoomSretch is the setting that met my needs across the board.  Very easy to use.

Still doesn’t explain why this is behaving correctly in the Corona Simulator, but looking un-optimized in Xcode or on the device.  That has to be a bug…

What does your config.lua look like?

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

Then I tried…

if ( string.sub( system.getInfo(“model”), 1, 2 ) == “iP” and display.pixelHeight > 960 ) then
   application =
   {
      content =
      {
         width = 320,
         height = 568,
         scale = “ZoomStretch”,
  fps = 30,
}
}

else

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

end

No go!  It just doesn’t work with ZoomStretch.  The other settings mentioned, letterbox and zoomeven, don’t look right.

I’m having no luck using if then statements.  That’s making matters worse!  Not behaving at all like it should.

This simple config has served me well across all devices until the iPhone 5.  I have no idea why it’s not working.  It’s clearly a bug.

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

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

Hi @nilesmitchell,

This is caused by omitting a “tall” launch image from the project, something that Apple started requiring when the iPhone5 launched. It’s a common oversight and I see this issue mentioned twice a week or more. :wink:

See here:

http://docs.coronalabs.com/guide/distribution/buildSettings/index.html#launchimage

This will fix the issue you describe; just include that image, even if it’s a solid black rectangle for the time being.

Best regards,

Brent Sorrentino

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

Brent,

Still a no-go!  I added a 640 × 1136 PNG display image and named it Default-568h@2x.png.  I still have the same problem as before.  Any ideas?

Niles

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,

Have you experimented with the other scale factors? Zoom Stretch isn’t a very “popular” one, but if it works for you, then that’s fine. I’m just curious if you’ve tried “zoomEven” or “letterbox”. Also, did you read through the following guide about working with multiple devices? Many people have found this useful, or at least as a launchpad for building their config setup:

http://www.coronalabs.com/blog/2012/12/04/the-ultimate-config-lua-file/

Brent

It was a year ago when I wrote the app, so I don’t remember all the details, but ZoomSretch is the setting that met my needs across the board.  Very easy to use.

Still doesn’t explain why this is behaving correctly in the Corona Simulator, but looking un-optimized in Xcode or on the device.  That has to be a bug…

What does your config.lua look like?

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

Then I tried…

if ( string.sub( system.getInfo(“model”), 1, 2 ) == “iP” and display.pixelHeight > 960 ) then
   application =
   {
      content =
      {
         width = 320,
         height = 568,
         scale = “ZoomStretch”,
  fps = 30,
}
}

else

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

end

No go!  It just doesn’t work with ZoomStretch.  The other settings mentioned, letterbox and zoomeven, don’t look right.

I’m having no luck using if then statements.  That’s making matters worse!  Not behaving at all like it should.

This simple config has served me well across all devices until the iPhone 5.  I have no idea why it’s not working.  It’s clearly a bug.

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