I am trying to set UIDocumentPickerViewController
to only allow selection of files with .sqlite extension with a dynamic UTI. I don't want to define this as a document type for my app since I cannot handle any sqlite file, I just want to enable backup and transfer with iCloud drive.
NSString *typeForExt = (__bridge NSString *)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, CFSTR("sqlite"), kUTTypeItem);
UIDocumentPickerViewController *iCloudPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[typeForExt] inMode:UIDocumentPickerModeImport];
UIDocumentPickerViewController
will allow selection of sqlite files if I define the type as the generic public.item but then every file is an option.