Black bars on iOS

Hi there,

thanks for reading.

I’m developing an universal app using this config.lua

application = { content = { width = 640, height = 960, scale = "letterBox", fps = 60, }, } 

the apk I made look fine on Android but on iOS  black bars appear outside my content area. I placed images bigger than the content area to make sure I didn’t have black bars, nevertheless I have black bars on IOS but not  in Android. The weird thing to me is that the app look fine on the Corona Simulator for IOS devices but the black bars appear on the Xcode iOS simulator as well as in the actual device. 

I attach a screenshot of the Corona Simulator and the Xcode iOS simulator for you to compare.

Does anyone know how to avoid this problem?

Thanks a lot for your help. I’ve been trying to figure it out the whole day without success.

Take a look at how I handle sizing images in this askEd question starter project:

https://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/askEdStarter.zip

Thanks for answer roaminggamer.

I’m doing exactly the same as you. Actually the image that I show in my pics is also 720x1386. Mine and yours are cropped in iOS simulator. Try your project on the iOS Simulator and you’ll see what I’m talking about. 

I think it has something to do with iOS since it used to work fine in the past but not anymore.

https://forums.coronalabs.com/topic/68418-black-bars-on-regular-build-with-iphone-7/

May be of use.

Thanks nick_sherman!!

That totally did the trick!  :lol:

  1. When you say iOS simulator, do you mean xCode simulated devices?

1a. What device(s) specifically.

  1. Cropped.  The image should be cropped on some devices.  It has safe space and a bleed area.  The bleed area is cropped on some devices.

I have no issues with the example I pointed you to, so I must not be understanding the post.

These are my results (all correct and expected), is this not what you are seeing?
 
Black edges in these images is the bleed space of the texture, not the black background the default screen color.
 
Examine the iPhoneX and iPadAir images at full resolution and you’ll see the red edge of the texture at the top/bottom and sides respectively.  i.e. on The iPhoneX all of the veritcal bleed is used and shown.  On the iPad, all of the horizontal bleed is used and shown.
 
https://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2018/05/magicRecipe.zip
 
iPhone 4 - Bleed space completely cropped.
iPhone4.png

iPhone 5(6,7 same) - Bleed cropped horizontally, partially used vertically.
iPhone5.png

iPhone X - Bleed cropped horizontally, fullyused vertically.
iPhoneX.png

iPad Air - Bleed space completely cropped vertically, completely used horizontally.
iPadAir.png

Thanks roaminggamer. 

The problem wasn’t the code in the mail.lua nor in the congif.lua. It has to do with the building.settings and the splashcreens that set the content to 640 x 960 in every device.

Thanks for taking the time to visit this post again.

Cheers!

Good enough.  As long as you’re up and running again.  -Cheers

I’m thanks indeed  :smiley:

Take a look at how I handle sizing images in this askEd question starter project:

https://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/askEdStarter.zip

Thanks for answer roaminggamer.

I’m doing exactly the same as you. Actually the image that I show in my pics is also 720x1386. Mine and yours are cropped in iOS simulator. Try your project on the iOS Simulator and you’ll see what I’m talking about. 

I think it has something to do with iOS since it used to work fine in the past but not anymore.

https://forums.coronalabs.com/topic/68418-black-bars-on-regular-build-with-iphone-7/

May be of use.

Thanks nick_sherman!!

That totally did the trick!  :lol:

  1. When you say iOS simulator, do you mean xCode simulated devices?

1a. What device(s) specifically.

  1. Cropped.  The image should be cropped on some devices.  It has safe space and a bleed area.  The bleed area is cropped on some devices.

I have no issues with the example I pointed you to, so I must not be understanding the post.

These are my results (all correct and expected), is this not what you are seeing?
 
Black edges in these images is the bleed space of the texture, not the black background the default screen color.
 
Examine the iPhoneX and iPadAir images at full resolution and you’ll see the red edge of the texture at the top/bottom and sides respectively.  i.e. on The iPhoneX all of the veritcal bleed is used and shown.  On the iPad, all of the horizontal bleed is used and shown.
 
https://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2018/05/magicRecipe.zip
 
iPhone 4 - Bleed space completely cropped.
iPhone4.png

iPhone 5(6,7 same) - Bleed cropped horizontally, partially used vertically.
iPhone5.png

iPhone X - Bleed cropped horizontally, fullyused vertically.
iPhoneX.png

iPad Air - Bleed space completely cropped vertically, completely used horizontally.
iPadAir.png

Thanks roaminggamer. 

The problem wasn’t the code in the mail.lua nor in the congif.lua. It has to do with the building.settings and the splashcreens that set the content to 640 x 960 in every device.

Thanks for taking the time to visit this post again.

Cheers!

Good enough.  As long as you’re up and running again.  -Cheers

I’m thanks indeed  :smiley: