My app is now sharing Documents
directory on iOS 11 Files app "On My iPhone" section.
(Thanks to this article: Working with the Files App in iOS 11)
Question is how to open this directory or at least File app root page via URL Scheme. UIDocumentPickerViewController
or UIDocumentBrowserViewController
doesn't help in this situation.
guard let documentDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first,
let components = NSURLComponents(url: documentDirectory, resolvingAgainstBaseURL: true) else {
return
}
components.scheme = "shareddocuments"
if let sharedDocuments = components.url {
UIApplication.shared.open(
sharedDocuments,
options: [:],
completionHandler: nil
)
}
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