I have been experimenting with the use of the safe area in the iPhone X (onwards) models and have had only limited success. The values returned function correctly but if you constrain the views to the safe area you produce further problems in presenting a pleasing interface.
The available screen real-estate within the safe area is extremely limiting in landscape and is exacerbated by having to remain clear of the 'Home' bar at centre-bottom of the screen. The visual attraction of the interface is also degraded in landscape by the rounded corners. In the image below the colours of the Navigation Bar, rear panel and the list view are different for clarity:
The programmer's views are constrained to within the panel that describes the safe area. Despite this, the Navigation Bar overhangs beyond this area to the screen edge which then presents rounded ends in a rather unpleasing view. The rear panel is currently grey. If you make this the same colour as the Navigation Bar you lose the impression created that the Navigation Bar shows 'this way up'. It is also very difficult to find a contrasting colour scheme for the content that does not look weird.
Before I give up completely and scrap all landscape use for iPhones..... Is there a way of limiting the width in the navigation bar so that it could be made the same width as the safe area to give a truly rectangular interface?