UIDocumentBrowserViewController needs a way to request folder scope

Originator:steipete
Number:rdar://36129256 Date Originated:19-Dec-2017 01:32 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:11.2
Classification:Serious Bug Reproducible:Always
 
Summary:
Many file formats have cross-references to other files that are required to correctly render it. PDF files might reference (X)FDF files or other, linked PDF documents. HTML documents requite JS, CSS, Image and video files to correctly render.

UIDocumentBrowserViewController offers a secure scope for the tapped file, however has no way of even requesting access to linked files. This limits functionality in our case (PDF Viewer) or completely breaks it for other cases (e.g. a Markdown editor/preview with images linked).

Steps to Reproduce:
This is a conceptual (security) design issue, so no example project can be sent or is required.

Expected Results:
API to request access to a file with an relative path inside the same storage scope (e.g. inside Dropbox, inside iCloud, inside local storage)

API should show a alert to request additional access. Alternatively allow to get a folder-scope access. This API should also offer an NSProgress object to track download progress and to allow error reporting (no internet connection, download failed, etc…)

Actual Results:
Functionality is reduced. Opening linked external files in PDF Viewer fails, unless files are stored in local storage, as we can work around it in that case.

Version:
11.2

Notes:
This is a conceptual limitation that limits adoption for any more complex app. Think video editor where a project file accesses linked files. An m3u mp3 playlist. 

A bundle is not a good workaround as various file providers do not handle bundles well (e.g. Dropbox) and it is not a natural concept for e.g. HTML websites to use a bundle folder.

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!