uidocumentpickerviewcontroller

Need to allow ppt files to be selected by UIDocumentPicker

早过忘川 提交于 2020-04-18 05:45:52
问题 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:

Reading files from external storage in iOS 13

不问归期 提交于 2020-03-19 05:04:37
问题 I have an iOS app that is trying to read files from an external storage device without importing them into the App's sandbox. I have followed Apple's documentations outlined here to do this -- Providing Access to Directories I'm able to retrieve the selected directory ( which is on an external storage device connected via the Lightning port ) and enumerate the files inside the directory. However, when I try to do something with those files as per the recommended pattern, I get a failure and

Reading files from external storage in iOS 13

a 夏天 提交于 2020-03-19 05:01:07
问题 I have an iOS app that is trying to read files from an external storage device without importing them into the App's sandbox. I have followed Apple's documentations outlined here to do this -- Providing Access to Directories I'm able to retrieve the selected directory ( which is on an external storage device connected via the Lightning port ) and enumerate the files inside the directory. However, when I try to do something with those files as per the recommended pattern, I get a failure and

Unable to pick pages file with UIDocumentPickerViewController

江枫思渺然 提交于 2019-12-14 03:48:23
问题 I'm using UIDocumentPickerViewController for picking document. Below are the specified UTIs : NSArray *types = @[(NSString*)kUTTypeImage,(NSString*)kUTTypeSpreadsheet,(NSString*)kUTTypePresentation,(NSString*)kUTTypePDF,(NSString*)kUTTypeRTF,(NSString*)kUTTypePlainText,(NSString*)kUTTypeText]; UIDocumentPickerViewController *dpvc = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:types inMode:UIDocumentPickerModeImport]; The files created from pages app (pages file) are grayed