Reputation: 840
I'm using this code to get document from iCloud in my app.
let documentPicker: UIDocumentPickerViewController = UIDocumentPickerViewController(documentTypes: ["public.content","public.data"], in: UIDocumentPickerMode.import)
documentPicker.delegate = self
documentPicker.modalPresentationStyle = UIModalPresentationStyle.fullScreen
if let popoverPresentationController = documentPicker.popoverPresentationController {
popoverPresentationController.sourceView = sender
}
self.present(documentPicker, animated: true, completion: nil)
I want three type of document from iCloud namely .pdf, .doc, .docx. I'm able to get PDF files but not the .doc files from icloud I'm giving proper UTIs for the files types i.e. "public.content","public.data". These UTIs are given here on the page apple Documentation. public.data confirms for doc files but still I'm not able to get the doc files.
Upvotes: 0
Views: 1353