Getting Black Bars on iPhone 5

Hello all,

An odd issue crept up recently.  There is a set of apps I have been developing that have looked fine on iPhone 5, and used zoomStretch.  UNTIL NOW…

Now I’m getting black bars on the left/right sides of the screen.  This shouldn’t be happening if I use zoomStretch, right?  Is there something more I should be doing now?  I feel like this is something possibly Apple changed recently that is affecting my Corona projects now, as before recently I had absolutely no problem with getting background images to take up the entire screen.  I’m also setting the display for landscape left and right.

My build.settings for iPhone 5:

UILaunchImages = { { --iPhone 5 ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{640, 1136}" }, { --iPhone 5 ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{640, 1136}" }, }

Can you post some screen shots? 

Your config.lua? 

Your whole build.settings? 

What version of Corona SDK are you using?

Thanks

Rob

Rob,

Thanks for the reply.  We actually resolved it in a rather strange way… we removed the UILaunchImages table completely from build.settings, nor did we have anywhere else in build.settings that referenced any of our splash images and it worked just fine.  This is all on build 2407.  The two splash images we use are 640x1136 (iPhone 5) Default-568h@2x.png, and the other is 1024x768 Default-Landscape.png. I guess it automatically knew to handle that without adding anything special to build.settings, but when specifically trying to use the LaunchImages table it just failed completely?

Rob,

I’ve got the same problem with “zoomStretch” working with iPhone5.

I’m getting the Black bars on iPhone5 using the LaunchImages table in landscape mode.

I don’t understand why iPhone6+ requires the image name to be “Default-Landscape-736h@3x.png” and the UILauchImageName includes “-Landscape” and the iPhone6/5/4 don’t include “-Landscape” in the UILaunchImageName, yet the image names include it.

example: Default-Landscape-568h@2x.png,     the UILauchImageName = Default-568h

example: Default-Landscape-736h@3x.png,    the UILaunchImageName = Default-Landscape-736h

Also the Landscape sizes are reversed,  1136x640 (actual image) vs. {320, 568} in the table.

This doesn’t make sense to me.  Are the Docs correct?

I can’t get rid of the Black bars in landscape mode

Nail

Can you put together a demo app that has this problem?  I just took the code from the build guide, added it to an Ultimate config.lua based project on my iPhone 6 running iOS 8.1 and got no black bars.

I’ll need your config.lua, build.settings, the default image files you’re trying to use and enough  main.lua and assets that shows me the black bars.

Zip that up, and put it somewhere (like Dropbox) where I can download it from and I’ll look at it.

Rob

include all Portrait versions of the launch image

I was having similar problems when porting to the new iPhones, and the cause of it was because I had deleted the portrait version of the startup image from the UILaunchImages as my app is landscape only.  Apparently if it launches in Portrait mode as is standard on iPhones you’ll need that portrait launch image before it transitions to landscape. 

Thanks for that info Enerst.

I’ll play with adding those images in tomorrow.

I’m thinking this must be why I can’t load my app into the Xcode iPhone6 and 6+ simulators.

Nail

Just to clarify… All iPhones except the 6 Plus only use Portrait launch images.  However an Apple bug requires having the landscape entries in the table in your build.settings (we just copy it to the Info.plist).  Just point them to your vertical images and you’re good to go.   The IPads and the 6 Plus can use Landscape launch images, so you should provide the appropriate launch images for that device.

Rob

Rob,

I added back in the iPhone5 portrait table to the LaunchImages table and it removed the black bars.

I have all 3 tables included now, portrait/landscapeLeft/landscapeRight for iPhone5.

The reason I couldn’t load my app on iPhone6 and 6+ Xcode simulators was that I was using daily build 2014.2494 which isn’t listed in the daily builds any longer., it must have been removed.  There must have been a bug in it which wouldn’t allow the app to load in those xcode simulators, it would launch the 4s simulator.

Using the most recent buld, 2014.2500, iPhone 6 and 6+ simulators launch properly again.

Nail

Can you post some screen shots? 

Your config.lua? 

Your whole build.settings? 

What version of Corona SDK are you using?

Thanks

Rob

Rob,

Thanks for the reply.  We actually resolved it in a rather strange way… we removed the UILaunchImages table completely from build.settings, nor did we have anywhere else in build.settings that referenced any of our splash images and it worked just fine.  This is all on build 2407.  The two splash images we use are 640x1136 (iPhone 5) Default-568h@2x.png, and the other is 1024x768 Default-Landscape.png. I guess it automatically knew to handle that without adding anything special to build.settings, but when specifically trying to use the LaunchImages table it just failed completely?

Rob,

I’ve got the same problem with “zoomStretch” working with iPhone5.

I’m getting the Black bars on iPhone5 using the LaunchImages table in landscape mode.

I don’t understand why iPhone6+ requires the image name to be “Default-Landscape-736h@3x.png” and the UILauchImageName includes “-Landscape” and the iPhone6/5/4 don’t include “-Landscape” in the UILaunchImageName, yet the image names include it.

example: Default-Landscape-568h@2x.png,     the UILauchImageName = Default-568h

example: Default-Landscape-736h@3x.png,    the UILaunchImageName = Default-Landscape-736h

Also the Landscape sizes are reversed,  1136x640 (actual image) vs. {320, 568} in the table.

This doesn’t make sense to me.  Are the Docs correct?

I can’t get rid of the Black bars in landscape mode

Nail

Can you put together a demo app that has this problem?  I just took the code from the build guide, added it to an Ultimate config.lua based project on my iPhone 6 running iOS 8.1 and got no black bars.

I’ll need your config.lua, build.settings, the default image files you’re trying to use and enough  main.lua and assets that shows me the black bars.

Zip that up, and put it somewhere (like Dropbox) where I can download it from and I’ll look at it.

Rob

include all Portrait versions of the launch image

I was having similar problems when porting to the new iPhones, and the cause of it was because I had deleted the portrait version of the startup image from the UILaunchImages as my app is landscape only.  Apparently if it launches in Portrait mode as is standard on iPhones you’ll need that portrait launch image before it transitions to landscape. 

Thanks for that info Enerst.

I’ll play with adding those images in tomorrow.

I’m thinking this must be why I can’t load my app into the Xcode iPhone6 and 6+ simulators.

Nail

Just to clarify… All iPhones except the 6 Plus only use Portrait launch images.  However an Apple bug requires having the landscape entries in the table in your build.settings (we just copy it to the Info.plist).  Just point them to your vertical images and you’re good to go.   The IPads and the 6 Plus can use Landscape launch images, so you should provide the appropriate launch images for that device.

Rob

Rob,

I added back in the iPhone5 portrait table to the LaunchImages table and it removed the black bars.

I have all 3 tables included now, portrait/landscapeLeft/landscapeRight for iPhone5.

The reason I couldn’t load my app on iPhone6 and 6+ Xcode simulators was that I was using daily build 2014.2494 which isn’t listed in the daily builds any longer., it must have been removed.  There must have been a bug in it which wouldn’t allow the app to load in those xcode simulators, it would launch the 4s simulator.

Using the most recent buld, 2014.2500, iPhone 6 and 6+ simulators launch properly again.

Nail