Allow the UIDocumentPickerViewController on iOS 11 to pick folders
| Originator: | lextar | ||
| Number: | rdar://32712470 | Date Originated: | June 12 2017, 4:45 PM |
| Status: | Open | Resolved: | |
| Product: | iOS + SDK | Product Version: | 11.0 beta 1 |
| Classification: | Reproducible: |
Area:
Something not on this list
Summary:
Before iOS 11, it was possible to open folders using the UIDocumentPickerViewController by adding kUTTypeDirectory to the array of document types if the document provider extension supported. This enabled one app to list and edit the contents of an entire folder in another app's sandbox.
For example, in my code editor app Textastic, you can open a folder from the Git client Working Copy. This is described in this blog post:
http://blach.io/2016/08/02/opening-git-repository-folders-in-textastic-6-2/
Please add this functionality to the new document picker when picking folder from local storage.
Steps to Reproduce:
Present a document picker with kUTTypeDirectory in the list of document types:
NSArray *utis = @[
(NSString *)kUTTypeText,
(NSString *)kUTTypePlainText,
(NSString *)kUTTypeSourceCode,
(NSString *)kUTTypeScript,
(NSString *)kUTTypeDirectory
];
UIDocumentPickerViewController *picker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:utis inMode:UIDocumentPickerModeOpen];
[self presentViewController:picker animated:YES completion:nil];
Expected Results:
In addition to picking files, it should be possible to pick a directory from the "On my iPhone/iPad" local storage.
Observed Results:
You can only pick files.
Version:
iOS 11 Beta 1
Notes:
Configuration:
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!