iOS 10.3 build failed to detect screen boundary by display.screenOriginX or display.screenOriginY

The API “display.screenOriginX” and “display.screenOriginY” works fine with Simulator and Android builds. However it can’t return correct values for iOS build by iOS 10.3 SDK.

The following 3-files simple sample project shows the error.

1. config.lua

application = {

content = {

width = 320,

height = 480, 

scale = “letterBox”,

fps = 30,

},

}

2. build.settings

settings = {

 

orientation = {

default = “portrait”,

supported = { “portrait”, }

},

iphone = {

plist = {

}

},

}

main.lua

display.setStatusBar( display.HiddenStatusBar )

display.setDefault(“background”, 0, 0, 0)

local txt_1 = display.newText("display.screenOriginX: "…display.screenOriginX, 0, 0, native.systemFont, 15)

txt_1.x = display.contentCenterX

txt_1.y = display.contentCenterY - 20

local txt_2 = display.newText("display.screenOriginY: "…display.screenOriginY, 0, 0, native.systemFont, 15)

txt_2.x = display.contentCenterX

txt_2.y = display.contentCenterY + 20

In simulator with iPhone5 selected, it shows that display.screenOriginY equals -44, which is correct.

However, if the iOS build is run by an iPhoneSE device, it shows that display.screenOriginY equals -0

As I know, this problem occurs only with new iOS 10.3 build, which happens no matter I used Corona-3068 or Corona-3100.

Is this a Corona bug, or I missed something in my code?

Do you have black bars?  If so you probably are not enabling tall-mode.  Try this guide for correct setup for iOS - https://docs.coronalabs.com/guide/distribution/launchFile/index.html

Thanks for help.

Yes I did have black bars on top and bottom. I can’t understand what a “tall-mode” is. Could you explain in detail?

OK I got it.

The problem and solution were explained here:

https://forums.coronalabs.com/topic/68923-letterbox-different-from-simulator-to-device/

Anyway I do think Corona team must state the changes in their guide documents.

Do you have black bars?  If so you probably are not enabling tall-mode.  Try this guide for correct setup for iOS - https://docs.coronalabs.com/guide/distribution/launchFile/index.html

Thanks for help.

Yes I did have black bars on top and bottom. I can’t understand what a “tall-mode” is. Could you explain in detail?

OK I got it.

The problem and solution were explained here:

https://forums.coronalabs.com/topic/68923-letterbox-different-from-simulator-to-device/

Anyway I do think Corona team must state the changes in their guide documents.