black bars on iphone 6 plus

getting these black bars on the  iphone 6 plus and xcode simulator but not in the corona simulator  

local aspectRatio = display.pixelHeight / display.pixelWidth application = { &nbsp; &nbsp; content = { &nbsp; &nbsp; &nbsp;&nbsp; width = aspectRatio \> 1.5 and 320 or math.floor( 480 / aspectRatio ), &nbsp; &nbsp; &nbsp;&nbsp; height = aspectRatio \< 1.5 and 480 or math.floor( 320 \* aspectRatio ), &nbsp; &nbsp; &nbsp;&nbsp; scale = "letterBox", &nbsp; &nbsp; &nbsp;&nbsp; fps = 30, &nbsp; &nbsp; &nbsp;&nbsp; imageSuffix = { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["@2"] = 1.5, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["@4"] = 3.0, &nbsp; &nbsp; &nbsp;&nbsp; }, &nbsp; &nbsp; },&nbsp; }

f6GhNOB.png

how can i fix this ? 

Hi @mmk.verheijden,

Can you try removing those “variable” width and height lines and just replace them with constant values?

[lua]

      width = 320,

      height = 480,

[/lua]

Then report back what happens.

Thanks,

Brent

tacORj2.png

ps the display.setDefault( “background”, 0, 0, 1 ) doesn’t seem to work on ios ( corona Version 2015.2667 (2015.7.2) )

found the problem

fixed it by removing this form build.settings :

 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UILaunchImages = { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp;-- iPhone 4 Portrait &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageMinimumOSVersion"] = "7.0", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageName"] = "Default", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageOrientation"] = "Portrait", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageSize"] = "{320,480}" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp;-- iPhone 5 Portrait &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageMinimumOSVersion"] = "7.0", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageName"] = "Default-568h", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageOrientation"] = "Portrait", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageSize"] = "{320,568}" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp;-- iPad Portrait &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageMinimumOSVersion"] = "7.0", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageName"] = "Default-Portrait", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageOrientation"] = "Portrait", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageSize"] = "{768,1024}" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp;-- iPhone 6 Portrait &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageMinimumOSVersion"] = "8.0", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageName"] = "Default-667h", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageOrientation"] = "Portrait", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageSize"] = "{375,667}" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp;-- iPhone 6 Plus Portrait &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageMinimumOSVersion"] = "8.0", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageName"] = "Default-736h", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageOrientation"] = "Portrait", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageSize"] = "{414,736}" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; },

Now you have another problem. You are running in iPhone 5 compatibility mode.

You should put the code back in build settings, but make sure there is a space after the comma in the "UILaunchImageSize lines, i.e.

[“UILaunchImageSize”] = “{414, 736}”  instead of:
[“UILaunchImageSize”] = “{414,736}”

Make sure to provide the right images too.

Rob

Hi rob everything seems to behave as it should without the code block on iPad iPhone 5/6 and it’s showing the right launch imagine… I’ll try the space, Ps what’s the benefit of adding this code other than the launch images?

If you don’t include it, on the iPhone 6 and iPhone 6+ you go into iPhone 5 compatibility mode.  Basically the iPhone 5’s 640x1136 screen will be stretched to fit the two larger screens which may make your graphics and images not look as sharp.

Okay I put the space in and now it’s working thanks for the tip

Hi @mmk.verheijden,

Can you try removing those “variable” width and height lines and just replace them with constant values?

[lua]

      width = 320,

      height = 480,

[/lua]

Then report back what happens.

Thanks,

Brent

tacORj2.png

ps the display.setDefault( “background”, 0, 0, 1 ) doesn’t seem to work on ios ( corona Version 2015.2667 (2015.7.2) )

found the problem

fixed it by removing this form build.settings :

 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UILaunchImages = { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp;-- iPhone 4 Portrait &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageMinimumOSVersion"] = "7.0", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageName"] = "Default", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageOrientation"] = "Portrait", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageSize"] = "{320,480}" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp;-- iPhone 5 Portrait &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageMinimumOSVersion"] = "7.0", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageName"] = "Default-568h", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageOrientation"] = "Portrait", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageSize"] = "{320,568}" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp;-- iPad Portrait &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageMinimumOSVersion"] = "7.0", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageName"] = "Default-Portrait", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageOrientation"] = "Portrait", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageSize"] = "{768,1024}" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp;-- iPhone 6 Portrait &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageMinimumOSVersion"] = "8.0", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageName"] = "Default-667h", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageOrientation"] = "Portrait", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageSize"] = "{375,667}" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; { &nbsp;-- iPhone 6 Plus Portrait &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageMinimumOSVersion"] = "8.0", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageName"] = "Default-736h", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageOrientation"] = "Portrait", &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ["UILaunchImageSize"] = "{414,736}" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; },

Now you have another problem. You are running in iPhone 5 compatibility mode.

You should put the code back in build settings, but make sure there is a space after the comma in the "UILaunchImageSize lines, i.e.

[“UILaunchImageSize”] = “{414, 736}”  instead of:
[“UILaunchImageSize”] = “{414,736}”

Make sure to provide the right images too.

Rob

Hi rob everything seems to behave as it should without the code block on iPad iPhone 5/6 and it’s showing the right launch imagine… I’ll try the space, Ps what’s the benefit of adding this code other than the launch images?

If you don’t include it, on the iPhone 6 and iPhone 6+ you go into iPhone 5 compatibility mode.  Basically the iPhone 5’s 640x1136 screen will be stretched to fit the two larger screens which may make your graphics and images not look as sharp.

Okay I put the space in and now it’s working thanks for the tip