Hi,
I've an app adopted the iOS 11 UIDocumentBrowserViewController. I've declared my own document type (UTI) and the document creation process worked well.
However, when it's about to "import" a file, I called UIDocumentBrowserViewControlller.revealDocument() by passing the URL I got from application(open: options: ). The completion showed no errors, but I cannot see the document been imported as expected.
The "revealedDocumentURL" is actually pointing to an "Inbox" folder under the app container's Documents folder. Something like:
file:///<App Container>/Dcouments/Inbox/filename.extension
But nothing inside that folder (nor the folder itself) is visible in the DocumentBrowser, nor in the Files app.
Further more, while revealDocument (with importIfNeeded=true) being called, the delegate's documentBrowser(_:didImportDocumentAt:toDestinationURL:) function is never called. But according to the documentation here , it should call the delegate function before calling completion handler.
Can anyone please advice what's the correct way to handle file import with the DocumentBrowserViewController?
Thanks a lot,
-Robin