0

Missing Edit button for Access/Disable another cloud drives

UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:types inMode:UIDocumentPickerModeImport];
documentPicker.delegate = self;
//documentPicker.editButtonItem.enabled = true;
//documentPicker.modalPresentationStyle =UIModalPresentationFormSheet;
[self presentViewController:documentPicker animated:YES completion:nil];

Can anyone suggest to me how to enable an Edit button on the top right side and do an Enable/Disable for other drives such as: (Dropbox, Google Drive, iCloud) from a list?(Those drives are already installed in my device).

Also how could I access only Excel and Google sheets files from drives? Thank you in advance.

ACerts
  • 308
  • 1
  • 6
  • 22

1 Answers1

0

Adding an edit button is not possible. Please file a bug if you need it. The user can edit the list in the Files app and this will be reflected in your picker.

For the second question, you can set the UTIs of the files the user can select in the initializer of the picker (your « types@ argument)

Thomas Deniau
  • 2,488
  • 1
  • 15
  • 15
  • Thank you .. Now I got it. @Thomas Deniau Is there any library to parse data(I have 4 columns) from Excel files into the app. – user9799909 May 21 '18 at 06:41
  • Not an expert on third-party libraries... there’s nothing built-in. You can preview the file using QLPreviewController but not extract data from it. – Thomas Deniau May 22 '18 at 07:39
  • I want to access only Google sheet and Excel files types in a file browser. Now I used "kUTTypeSpreadsheet" for this I'm able to access Excel files, not Google sheet file I want to access both files. any suggestions? – user9799909 May 25 '18 at 13:05
  • maybe Google Sheets doesn’t define their type correctly. Copy one somewhere where you have access and check the exact type identifier using `NSURLTypeIdentifierKey`. Note that you will probably have to re-define this type yourself as imported if you want your app to run properly on a device where the Google Sheets app is not installed. – Thomas Deniau May 26 '18 at 13:37
  • I’ve just checked. Google doesn’t seem to define a type for the Google Sheets files. The best you can do is define one yourself, as imported (because you’re not the authority for this type)... this will let you map their file extension to an UTI tHat you can then use. – Thomas Deniau May 26 '18 at 13:42