Last active
January 3, 2016 12:58
-
-
Save douglashill/8466066 to your computer and use it in GitHub Desktop.
Finds the best uniform type identifier (UTI) for a given filename extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import Foundation; | |
@import CoreServices; | |
int main(int argc, char *argv[]) { | |
@autoreleasepool { | |
NSString * UTI = (__bridge NSString *)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, | |
(CFStringRef)@"plist", | |
NULL); | |
NSLog(@"UTI is %@", UTI); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment