UIDocumentBrowserViewController offers no possibility to programatically request creating a new document

Originator:steipete
Number:rdar://35679139 Date Originated:24-Nov-2017 04:13 AM
Status:Open Resolved:
Product:iOS + SDK Product Version:iOS 11.2b
Classification:Enhancement Reproducible:Always
 
Summary:
This is a duplicate of radar #33101847
This is a duplicate of radar #33073431

UIDocumentBrowserViewController allows to easily create new documents by simply setting `allowsDocumentCreation` to true and implementing the delegate method `documentBrowser(_:didRequestDocumentCreationWithHandler:).

Often it is however needed to create a new document through other means, e.g. a URL Scheme, a UIKeyCommand or simply another workflow. This is of course possible by creating a document manually, BUT it is not possible to create a document in the current visible Folder because I can 

a) neither request the current visible folder
b) nor programatically request the creation of a document on UIDocumentBrowserViewController


Steps to Reproduce:
1. run the attached DocumentBrowser-based app
2. navigate to some folder, which is not the root folder
3. it has a UIKeyCommand (Cmd+N) set up to create a new document (Prints a logging statement)

Expected Results:
It is possible to 

a) either request the current displayed folder to manually create a document in this folder
b) programatically request the creation of a document in the current displayed folder

Actual Results:
The built-in document creation mechanism is only triggered, if the user taps on the “+” and there’s no way to read out the current folder

Version:
iOS 11.2b

Notes:

Comments


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!