iCloud 文档选择器:应用程序文件夹在导入时被禁用

iCloud Document Picker: App folders are disabled on import

我在尝试从 iCloud 导入时遇到有关应用程序文件夹被禁用的问题,请参见下图:

我检查了 google 驱动器的 iCloud 导入,它没有被禁用,如下图所示:

我需要从其他应用程序的文件夹中获取文档,我做错了什么?

这是我当前在 info.plist 中的设置:

代码:

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

documentPicker.delegate = self;

documentPicker.modalPresentationStyle = UIModalPresentationFormSheet;

[self presentViewController:documentPicker animated:YES completion:nil];

您需要在 UIDocumentPickerViewController 中添加 Utils

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];