I am trying to access third party cloud applications. my app upload button click to open UIDocumentPickerViewController
and need to pick files (single or multiple) then I am uploading my server.
Upload button click to UIDocumentPickerViewController
opening fullscreen not opening like action sheet.
Need to access all type of files.
Here below my code
let importMenu = UIDocumentPickerViewController(documentTypes: ["public.text", "com.apple.iwork.pages.pages", "public.data"], in: .import)
importMenu.delegate = self
importMenu.modalPresentationStyle = .formSheet
if let popoverPresentationController = importMenu.popoverPresentationController {
popoverPresentationController.sourceView = self.view;
//popoverPresentationController.sourceView = sender as? UIView
//popoverPresentationController.sourceRect = sender.bounds
}
self.present(importMenu, animated: true, completion: nil)