UIDocumentPickerViewController

I'm upgrading my app from minVersion iOS 11 to iOS 12. My compiler says that UIDocumentMenuViewController with UIDocumentPickerViewController is deprecated, they recommend to use directly the last one. So I change the code.

fileprivate func openDocumentPicker() {
        let documentPicker = UIDocumentPickerViewController(
            documentTypes: [
                "com.adobe.pdf",
                "org.openxmlformats.wordprocessingml.document",  // DOCX
                "com.microsoft.word.doc"  // DOC
            ],
            in: .import
        )
        documentPicker.delegate = self
        view.window?.rootViewController?.present(documentPicker, animated: true, completion: nil)
    }

When I open the picker in iOS 17.2 simulator and under it is well shown, like a page sheet. But in iOS 18.0 and up at first it opens like a page sheet with no content but then it is displayed as a transparent window with no content. Is there any issue with this component and iOS 18? If I open the picker through UIDocumentMenuViewControllerDelegate in an iphone with iOS 18.2 it is well shown.

Image in iOS 18.2 with the snippet

The same snippet in iOS 17.2 (and expected in older ones)

UIDocumentPickerViewController
 
 
Q