我在尝试从iCloud导入时遇到有关禁用应用文件夹的问题,请参阅下图:
我检查了谷歌驱动器的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];
答案 0 :(得分:1)
您需要在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];