Looking at any file type (for example, DOC or PDF), one is similar to the 'type' of the Finder How do you get the details? For example, under Finder, there is 'Word 97 format (.doc)' like DOC, and PDF Care is a portable document format (PDF). According to, 'the iOS file type provides a systemic registry of associations. "But I do not believe I am pulling the right information (I'm not really sure that I'm using the above registry).
I am using the code given below, and it is returning to 'com.microsoft.word.doc' for a doctor like RTF 'public.rtf', and PDF 'com.adobe. Pdf 'is a more bizarre link (weblog):' dyn.age81s3pcrv10g 'in the description None of the user friendly.
Jeff
NSURL * url = [NSURL fileURLWithPath: fullPathName]; if (URL == zero) returns [extension uppercase string] ; // ie, PDF UIDont Control Controller * doc = [UIDOn Interaction Controller Interaction] Controller with URL: URL;; if (Doctor == zero) Returns [Extension String] Extension; // E.E., PDF Returns doc. UTI;
E is. For example, a PDF file receives' Portable Document Format (PDF).
To use the code on the iPhone, the Mobile Corrections Services Framework and #import & lt; MobileCoices / Mobile Corps Services H & gt; / Code>. Error checking and ASERTTS are omitted for clarity. NSString * extension = [file name extension]; NSString * hint = @ "public.data"; CFStringRef UTI = UT Touch Crelet Illuminated Identifier Forteag (kUTTagClassFilenameExtension, (CFStringRef) Extension, (CFStringRef) signal); [(Nssting *) UTI AutoCare]; CFStringRef mime = UTTypeCopy prefertTagWithClass (UT, Koottag classmimetype); [(NSString *) Mime Autorex]; CFStringRef Description = UTType Coppi Discription (UT); [(Authenticate the details of NSSS * *]]; NSLog (@ "% @:% @", filename, description); ======================================= ===
Stack Overflow:
Apple:
Comments
Post a Comment