Commit e55b493a authored by Soomin Lee's avatar Soomin Lee

VLCDocumentPickerController: Add all supported UTI

This will allow the user to import video, audio, and subtitle files.
parent 37f4c961
......@@ -22,9 +22,26 @@
#pragma mark - Internal Methods
- (NSArray *)supportedUTIs
{
NSArray *dict = [[[NSBundle mainBundle] infoDictionary]
objectForKey:@"CFBundleDocumentTypes"];
NSMutableArray *result = [NSMutableArray array];
for (NSDictionary *item in dict) {
NSArray *contentTypes = [item objectForKey:@"LSItemContentTypes"];
if (contentTypes != nil) {
[result addObjectsFromArray:contentTypes];
}
}
return [result copy];
}
- (UIViewController *)configuredPickerViewController
{
NSArray *types = @[(id)kUTTypeAudiovisualContent];
NSArray *types = [self supportedUTIs];
UIDocumentPickerMode mode = UIDocumentPickerModeImport;
if (@available(iOS 11.2, *)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment