I am using UIDocumentPickerViewController with the import mode (UIDocumentPickerModeImport) in order to let the user import documents from cloud storage providers (dropbox, etc). Each time the user repeat the import process, he must browse through its folder hierarchy starting from the root of its cloud storage.
Is there a way to present a document picker on a given subdirectory ?
I am aware of the method:
[NSURL bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:]
But I cannot connect the dots with the Document picker presentation options. I would expect a picker option to present a document picker on a given bookmarked directory url.
You need init UIDocumentPickerViewController with url. For this action you can (and must) use initWithURL:inMode: method. That's all :)
You need to try with UIDocumentBrowserViewController
UIDocumentBroswerViewContoller has method importDocument(at:nextToDocumentAt:mode:completionHandler:) for importing documents from local as well as remote like dropbox, iCloud etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With