0

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.

Arun K
  • 810
  • 2
  • 12
  • 33

1 Answers1

3

according to this you must use com.microsoft.word.doc for doc types hope it works.

Community
  • 1
  • 1
Hossein
  • 797
  • 1
  • 8
  • 24
  • 1
    This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker.](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead) - [From Review] (https://stackoverflow.com/review/late-answers/17657874) – S4NDM4N Oct 18 '17 at 03:33