This should work:
NSWorkspace *workspace = [NSWorkspace sharedWorkspace]; for (NSURL *url in urls) { NSString *type; NSError *error; if ([url getResourceValue:&type forKey:NSURLTypeIdentifierKey error:&error]) { if ([workspace type:type conformsToType:@"public.movie"]) {
(You can also use UTTypeConformsTo() instead of the NSWorkspace method.)
Wevah
source share