UIDocumentBrowserViewController sometimes doesn't adhere to safe area insets on iPhone X

Originator:steipete
Number:rdar://36173901 Date Originated:21-Dec-2017 09:56 AM
Status:Open Resolved:
Product:iOS + SDK Product Version:11.2.1
Classification:Other Bug Reproducible:Sometimes
 
Summary:
I just opened PDF Viewer, it auto-restored the hierarchy, so the UIDocumentBrowserViewController wasn’t displayed (we present our controller on top right at startup time) and on going back I get the layout as in attached image. We do this since we shipped the first version with document browser support, so shouldn’t be anything new.

Steps to Reproduce:
This does work most of the time but sometimes gets into this weird state. pdfviewer.io

Expected Results:
Don’t place UI into the notch.

Actual Results:
UI in the notch. Even worse, once you tap the search bar you have to force-quit the app, as you can’t tap Cancel anymore. I tapped Recent and Browse a few times and then the extension just crashed, giving me the white screen of app death.

Version:
11.2.1

Notes:
I realize that this bug report won’t be very useful but I am unable to offer a reproducible sample for all the various issues we’re seeing with UIDocumentBrowserViewController. This one is just here to point a finger at “there are problems in the safe inset area”. If I am able to find a reproducible pattern, I’ll follow up.

Comments

Image: https://cl.ly/0E3z3J1w1L3z


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!