I would have expected the following code to draw the safe area in white, with the unsafe areas in red.
However when I run it on the iPhoneX simulator, it looks like the safe area dimensions given by corona are too great. In other words the given safe area is not safe.
I have attached a screen grab so you can see what I mean, the white area is partly obstructed by the speaker and camera part of the device. Unfortunately I do not have a physical iPhoneX to test on, only the simulator.
local totalArea = display.newRect(0,0,display.contentWidth,display.contentHeight) totalArea:translate(totalArea.width*0.5,totalArea.height*0.5) totalArea:setFillColor(1,0,0) local safeArea = display.newRect( display.safeScreenOriginX, display.safeScreenOriginY, display.safeActualContentWidth, display.safeActualContentHeight ) safeArea:translate( safeArea.width*0.5, safeArea.height*0.5 )