uti

MFMessageComposeViewController iOS7 addAttachmentData:typeIdentifier:filename: not working

浪子不回头ぞ 提交于 2019-12-28 10:05:07
问题 I want to attach an image to a MMS, on iOS7. I wrote following code: MFMessageComposeViewController *messageController = [[MFMessageComposeViewController alloc] init]; messageController.messageComposeDelegate = self; NSData *imgData = [NSData dataWithContentsOfFile:@"blablabla"]; BOOL didAttachImage = [messageController addAttachmentData:imgData typeIdentifier:@"public.data" filename:@"image"]; if (didAttachImage) { // Present message view controller on screen [self presentViewController

Handle every possible UTI in an OS X application

霸气de小男生 提交于 2019-12-25 13:15:08
问题 How do I make an OS X app respond to any possible document UTI as an editor? That is, it should be capable of handling any file dragged to its Dock icon. 回答1: Use the UTI public.data to handle all files. (Do not use public.item ; weird things will happen.) 来源: https://stackoverflow.com/questions/17050026/handle-every-possible-uti-in-an-os-x-application

Creating custom UTI for use with airdrop, iOS

[亡魂溺海] 提交于 2019-12-22 09:46:25
问题 I am using this code in my info.plist: <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeName</key> <string>AirDrop Profile File Type</string> <key>LSHandlerRank</key> <string>Default</string> <key>LSItemContentTypes</key> <array> <string>com.apple.customProfileUTI.customprofile</string> </array> </dict> </array> to declare a custom file type, going by the answer here, and have looked at the linked sample code, but couldn't follow it very well. I have a structure that I am

Issues with email attachment, PDF and CSV

我是研究僧i 提交于 2019-12-20 03:01:14
问题 I'm working with PDF generation,it generated the PDF, viewed using QLPreviewController , all worked fine except mail forwarding, I have two attachments of type .pdf and .csv. I have the following issues while emailing. sometimes no attachments while emailing pdf size will be very huge when pdf contains image(10 mb for one page pdf, if it contains image) Problem is when testing in device,in simulator it all works fine..., I come to know some exporting or importing UTI associated issues here

List/Search all existing UTIs (Uniform Type Identifiers)

怎甘沉沦 提交于 2019-12-18 04:43:08
问题 Is it possible to find a list of all existing Uniform Type Identifiers on a system? 回答1: How about /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump Even better: A Graph of all Universal Type Identifiers - Kevin Ballard's Blog 回答2: You can build your own graph with UTIsExplorer https://github.com/nst/UTIsExplorer The project includes a graph of all UTIs on my machine: http://seriot.ch/resources/utis_graph/utis_graph.pdf

How to tell (programmatically) if there are / are not any registered apps that support opening a specific document type?

余生颓废 提交于 2019-12-12 08:04:52
问题 Apple's documentation for UIDocumentInteractionController presentOpenInMenuFromBarButtonItem:animated: method states that "If there are no registered apps that support opening the document, the document interaction controller does not display a menu." In my app I want to display a button if and only if there is an app on the device that will open it. (I only want the button to pop up a menu to open a file; I don't want QuickLook, Copy or Print). As things stand, if the button is there, but no

iOS custom UTI in UIDocumentPickerViewController initWithDocumentTypes

喜你入骨 提交于 2019-12-10 23:18:21
问题 I am trying to open .obj files from iCloud drive in my app throw UIDocumentPickerViewController. I could't find standart UTi for .obj files. So, using this https://developer.apple.com/library/content/qa/qa1587/_index.html I try to add support of this file-extension for my app. there is info.plist sections : <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeIconFiles</key> <array> <string>arrow1</string> </array> <key>CFBundleTypeName</key> <string>OBJ model</string> <key

How do you get the Finder “Kind” for a file?

白昼怎懂夜的黑 提交于 2019-12-08 09:16:11
问题 I want to get the Finder "Kind" for a file. For example, for a file "foo.css", I want the string "CSS style sheet". So far, I'm doing something like this: NSURL *fileURL = [[NSURL alloc] initFileURLWithPath: filename]; NSString *utiType; NSError *error; BOOL success = [fileURL getResourceValue: &utiType forKey: NSURLTypeIdentifierKey error: &error]; if (!success) { NSLog(@"failure during reading utiType: error = %@", error); return; } NSString *utiDescription = (__bridge NSString *)

How to define a Uniform Type Identifier in a plist file?

折月煮酒 提交于 2019-12-08 08:57:24
问题 My application uses the following NSApplicationDelegate function. - (void)application:(NSApplication*)sender openFiles:(NSArray*)filenames; I want to use this function to enable the user to drag and drop image files onto the application icon in the dock. How do I have to define certain file types in my plist file to restrict them to be images? I found out the structure has to look something like this. // plist file contents taken from Preview.app [...] <key>CFBundleDocumentTypes</key> <array>

Show Icons for Custom UTIs in UIDocumentPickerViewController

两盒软妹~` 提交于 2019-12-07 08:49:23
问题 The iOS app I'm working on exports a UTI. The relevant parts of the Info.plist look like this: <key>UTExportedTypeDeclarations</key> <array> <dict> <key>UTTypeConformsTo</key> <array> <string>public.xml</string> <string>public.data</string> </array> <key>UTTypeDescription</key> <string>GPX Document</string> <key>UTTypeIdentifier</key> <string>de.company.app.gpx</string> <key>UTTypeSize320IconFile</key> <string>Doc320.png</string> <key>UTTypeSize64IconFile</key> <string>Doc64.png</string> <key