I tried to load some files from Dropbox/G-Drive/iCloud using the UIDocumentMenuViewController
. I tried,
UIDocumentMenuViewController *importMenu = [[UIDocumentMenuViewController alloc] initWithDocumentTypes:@[(__bridge NSString*)kUTTypeContent] inMode:UIDocumentPickerModeImport];
importMenu.delegate = self;
importMenu.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentViewController:importMenu animated:YES completion:nil];
with this to get this done. But I need to get only the doc and pdf types only from picker. But when I use kUTTypeContent
, this allows for images and videos also. Is there a way to allow this picker only for doc and pdf(custom types) or is there a why to prevent media files? Please help me with this.