2017-05-12 10 views
0

이 코드를 사용하여 앱에서 iCloud에서 문서를 가져옵니다.UIDocumentPickerViewController에서 .doc 파일을 가져올 수 없습니다. ioscopy

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) 

iCloud의 세 가지 유형의 .pdf, .doc, .docx 문서를 원합니다. PDF 파일을 가져올 수 있지만 icloud에서 .doc 파일을 가져올 수 없습니다. "public.content", "public.data"등의 파일 유형에 대해 적절한 UTI를 제공하고 있습니다. 이 UTI는 apple Documentation 페이지에서 제공됩니다. public.data는 doc 파일을 확인하지만 여전히 doc 파일을 가져올 수 없습니다.

답변

2

this에 따르면 희망 문서 형식은입니다. com.microsoft.word.doc를 사용해야합니다.

+1

이 질문에 대한 답변을 제공하지 않습니다. 충분한 [평판] (https://stackoverflow.com/help/whats-reputation)이 있으면 [모든 게시물에 주석 달기] (https://stackoverflow.com/help/privileges/comment) 할 수 있습니다. 대신 [묻는 사람의 설명이 필요없는 답변을 제공하십시오.] (https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can - 대신 -) - [검토 중] (https://stackoverflow.com/review/late-answers/17657874) – Sand