2

I'm having a problem regarding app folders being disabled when I'm trying to import from iCloud, see the image below:

My App iCloud import

I checked google drive's iCloud import and it's not disabled like in the image below:

Google Drive iCloud import

I need to get documents from other app's folder, what did I do wrong?

This is my current setup in my info.plist:

My info.plist

Code:

UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[@"public.item"] 
                  inMode:UIDocumentPickerModeImport];

documentPicker.delegate = self;

documentPicker.modalPresentationStyle = UIModalPresentationFormSheet;

[self presentViewController:documentPicker animated:YES completion:nil];
Bryan P
  • 4,142
  • 5
  • 41
  • 60

1 Answers1

1

You need to add the Utils in UIDocumentPickerViewController

UIDocumentPickerViewController *picker=[[UIDocumentPickerViewController alloc] 
      initWithDocumentTypes: @[(__bridge NSString *) kUTTypeContent,
                               (__bridge NSString *) kUTTypeData,
                               (__bridge NSString *) kUTTypePackage,
                               (__bridge NSString *) kUTTypeDiskImage,
                               @"com.apple.iwork.pages.pages",
                               @"com.apple.iwork.numbers.numbers",
                               @"com.apple.iwork.keynote.key"] inMode:UIDocumentPickerModeImport];
Bryan P
  • 4,142
  • 5
  • 41
  • 60
Akhtar
  • 3,172
  • 5
  • 19
  • 21
  • I can't import documents in iOS 9, do you have an idea what happened? – Bryan P Feb 11 '16 at 12:58
  • @BryanPosas can you please explain a litle bit about the import ? what kind of file you want to import ? – Akhtar Feb 25 '16 at 16:51
  • 1
    I found my problem, it seems that if you don't merge after signing in your iCloud account, documents will get stuck at loading in the iCloud document picker – Bryan P Feb 26 '16 at 08:13
  • 1
    Another question, there are some keynote items that can't be retrieved, the document picker delegate returns a url with a slash at the end some/path/to/file/keynote.key/ and url in this format can't be retrieved, some can be retrieved, some can't. Have you encountered this problem before? Dropbox can retrieve the same file that causes the problem listed above and can also upload it successfully in their server – Bryan P Apr 08 '16 at 17:05