Black bars on top and bottom (only with live build)

As stated in the thread subject, when I open up my app with a live build, I see it with black bars at the top and at the bottom but this does not happen with a regular build. Since my objects position themselves relative to the edges, everything looks fine but I would not like this to happen if possible. I would like the live builds to mimic what my app would look like in a real build as much as possible. 

Note: The canvas is not stretched or shrunk; it would seem like the display.height is reduced and the app is centered.

What could be causing this?

OSX El Capitan 10.11.6

Corona: 2017.3054 (2017.3.9)

Corona Live server: Version 1.0 (1)

Tested on an iPhone 6S Plus.

My config.lua (which I use for pretty much everything)

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

Thanks! I will look at what is going on. Would it be possible to provide full example when the behaviour is exhibited?

I can’t with the current project but I will try to make a new one that’s not under NDA. 

Hey. I was trying to look at this. Could you please also share your build.settings?

vlads, here’s the build.settings file:

-- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight settings = { orientation = { default = "portrait", supported = { "portrait"} }, iphone = { plist = { -- Required in iOS 10 / Xcode 8 NSCalendarsUsageDescription = "Access to the calendar", NSPhotoLibraryUsageDescription = "Access to the photo library", NSCameraUsageDescription = "Access to the camera", CFBundleLocalizations = { "en", --English "es", --Spanish }, CFBundleDisplayName = "Test", CFBundleName = "Test", ITSAppUsesNonExemptEncryption = false, -- set to true if using encryption UIStatusBarHidden = false, UIPrerenderedIcon = true, -- set to false for "shine" overlay --UIApplicationExitsOnSuspend = true, -- uncomment to quit app on suspend CFBundleIconFiles = { 'Icon.png', 'Icon@2x.png', 'Icon-Small-40.png', 'Icon-Small-40@2x.png', 'Icon-60.png', 'Icon-60@2x.png', 'Icon-72.png', 'Icon-72@2x.png', 'Icon-76.png', 'Icon-76@2x.png', 'Icon-Small-50.png', 'Icon-Small-50@2x.png', 'Icon-Small.png', 'Icon-Small@2x.png' } } }, plugins = { ['plugin.texttospeech'] = { publisherId = 'com.spiralcodestudio' } }, -- Android permissions android = { usesPermissions = { "android.permission.RECORD\_AUDIO", }, } }

same problem for me.

when i create a compil with the Build: 2017.2975, the application is full screen on my iphone 7+

When i create a build with :

Build: 2017.3068

i have 1 cm black bar on top and bottom…

config :

local aspectRatio = display.pixelHeight / display.pixelWidth
 
application = {
   content = {
      width   = aspectRatio > 1.5 and 320 or math.ceil( 480 / aspectRatio ),
      height  = aspectRatio < 1.5 and 480 or math.ceil( 320 * aspectRatio ),
      scale   = “letterBox”,
      xAlign  = “left”,
      yAlign  = “top”,      
      fps = 60,
      --showRuntimeErrors = false,
      imageSuffix = {
         ["@2x"] = 1.5,
         ["@4x"] = 3.0,
      },
   },
}

what is the pb and the clue please ?

Hey, [member=‘latyl1’]! Do you get issue only with Live Builds as well?

no, it’s on regular build for me :frowning:

Sorry for inconveniences, [member=‘Latyl1’]. We moved minimal version to 8.0 this release, which probably affected your issue. This is probably not about your config.lua, but launch screen setup. My colleague, Rob, wrote lengthy explanation here.

To test this assumption, copy “LaunchScreen.storyboardc” from any sample in CoronaSDK/SampleCode, and set it up in build.settings with code like:

settings = { iphone = { plist = { UILaunchStoryboardName = "LaunchScreen", } }, }

Also, delete MinimumOSVersion line.

Thank you very much vlads, everything is ok now !

This worked for me as well. Thanks

I have the same issue. ONLY on live build. This happened either after I updated iOS/Xcode or started using a newer Corona daily build. I updated all of them the same day, so I can’t tell which of these updates caused it.

Edit: vlads solution worked perfectly for me as well. Cheers!

Thanks! I will look at what is going on. Would it be possible to provide full example when the behaviour is exhibited?

I can’t with the current project but I will try to make a new one that’s not under NDA. 

Hey. I was trying to look at this. Could you please also share your build.settings?

vlads, here’s the build.settings file:

-- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight settings = { orientation = { default = "portrait", supported = { "portrait"} }, iphone = { plist = { -- Required in iOS 10 / Xcode 8 NSCalendarsUsageDescription = "Access to the calendar", NSPhotoLibraryUsageDescription = "Access to the photo library", NSCameraUsageDescription = "Access to the camera", CFBundleLocalizations = { "en", --English "es", --Spanish }, CFBundleDisplayName = "Test", CFBundleName = "Test", ITSAppUsesNonExemptEncryption = false, -- set to true if using encryption UIStatusBarHidden = false, UIPrerenderedIcon = true, -- set to false for "shine" overlay --UIApplicationExitsOnSuspend = true, -- uncomment to quit app on suspend CFBundleIconFiles = { 'Icon.png', 'Icon@2x.png', 'Icon-Small-40.png', 'Icon-Small-40@2x.png', 'Icon-60.png', 'Icon-60@2x.png', 'Icon-72.png', 'Icon-72@2x.png', 'Icon-76.png', 'Icon-76@2x.png', 'Icon-Small-50.png', 'Icon-Small-50@2x.png', 'Icon-Small.png', 'Icon-Small@2x.png' } } }, plugins = { ['plugin.texttospeech'] = { publisherId = 'com.spiralcodestudio' } }, -- Android permissions android = { usesPermissions = { "android.permission.RECORD\_AUDIO", }, } }

same problem for me.

when i create a compil with the Build: 2017.2975, the application is full screen on my iphone 7+

When i create a build with :

Build: 2017.3068

i have 1 cm black bar on top and bottom…

config :

local aspectRatio = display.pixelHeight / display.pixelWidth
 
application = {
   content = {
      width   = aspectRatio > 1.5 and 320 or math.ceil( 480 / aspectRatio ),
      height  = aspectRatio < 1.5 and 480 or math.ceil( 320 * aspectRatio ),
      scale   = “letterBox”,
      xAlign  = “left”,
      yAlign  = “top”,      
      fps = 60,
      --showRuntimeErrors = false,
      imageSuffix = {
         ["@2x"] = 1.5,
         ["@4x"] = 3.0,
      },
   },
}

what is the pb and the clue please ?

Hey, [member=‘latyl1’]! Do you get issue only with Live Builds as well?

no, it’s on regular build for me :frowning:

Sorry for inconveniences, [member=‘Latyl1’]. We moved minimal version to 8.0 this release, which probably affected your issue. This is probably not about your config.lua, but launch screen setup. My colleague, Rob, wrote lengthy explanation here.

To test this assumption, copy “LaunchScreen.storyboardc” from any sample in CoronaSDK/SampleCode, and set it up in build.settings with code like:

settings = { iphone = { plist = { UILaunchStoryboardName = "LaunchScreen", } }, }

Also, delete MinimumOSVersion line.