问题 I need to allow ppt,docx, xlsx and pdf files only to be picked up by document picker in my application. What I need to set as document types when I initialize my document picker? 回答1: I have added couple of types in the below mentioned code, please check if it solves your issue: let types: [String] = [kUTTypePDF as String,kUTTypeSpreadsheet as String, kUTTypePresentation as String, "com.apple.iwork.pages.pages", "public.text"] let documentPicker = UIDocumentPickerViewController(documentTypes: