IPhone: Document Type Description or 'Kind' Description?

Here's the code to get the description. For example, a PDF files retrieves 'Portable Document Format (PDF).

Here's the code to get the description. For example, a PDF files retrieves 'Portable Document Format (PDF)'. To use the code on the iPhone, add the MobileCoreServices framework and #import .

Error checking and ASSERTs have been omitted for clarity. NSString* extension = filename pathExtension; NSString* hint = @"public. Data"; CFStringRef uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (CFStringRef)extension, (CFStringRef)hint); (NSString *)uti autorelease; CFStringRef mime = UTTypeCopyPreferredTagWithClass (uti, kUTTagClassMIMEType); (NSString *)mime autorelease; CFStringRef description = UTTypeCopyDescription(uti); (NSString*)description autorelease; NSLog(@"%@: %@", filename, description); ========================================== Stack Overflow: Where's the iPhone MIME type database?

Apple: Adopting Uniform Type Identifiers.

Worth mentioning: hint = @"public. Data"; specifies that a file's UTI is desired. Folders also have UTI information (see Apple's Adopting Uniform Type Identifiers).

– noloader Apr 2 at 22:20.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions