为什么照片应用程序未显示在设备上的文档提供程序扩展中?

我正在应用程序中选择照片,我使用UIDocumentMenuViewController来显示文档提供程序的扩展名列表。 此列表显示Dropbox,iCloud,GoogleDrive但不是原生照片应用,为什么? 我的代码示例:

 UIDocumentMenuViewController *menuVC = [[UIDocumentMenuViewController alloc] initWithDocumentTypes:@[@"public.image"] inMode:UIDocumentPickerModeImport]; 

在此处输入图像描述

我不确定本机是否有其他方法可以做到这一点,但我想出了一个解决方案,用处理程序添加自定义选项。 我添加了“Photos”选项,在处理程序中我使用了UIImagePickerViewController

  UIDocumentMenuViewController *menuVC = [[UIDocumentMenuViewController alloc] initWithDocumentTypes:UTIs inMode:UIDocumentPickerModeImport]; [menuVC addOptionWithTitle:@"Photos" image:nil order:UIDocumentMenuOrderFirst handler:^{ UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init]; imagePickerController.delegate = self; [self presentViewController:imagePickerController animated:YES completion:nil]; }]; 

我会做同样的事情并为“相机”添加另一个选项。