2015-11-05 157 views

回答

1

首先需要添加文檔類型。在這裏它XLS和XLSX格式的文檔

enter image description here

現在你需要指定進口UTI出口UTI

enter image description here

更多參考檢查How do I get my application to show up in the 「Open in...」 menu on iOS for a specific document type?

對全部System-DeclaredUniformTypeIdentifiers

注意:爲了得到確切的UTI特定的文件格式:

NSArray *extensionArray = [NSArray arrayWithObjects:@"doc", @"docx", @"ppt", @"pptx", @"xls", @"xlsx",@"mp3",@"mp4",@"rft",@"rtf",@"pages",@"key",@"numbers",nil]; 

for (int i=0; i<[extensionArray count]; i++) { 
    NSString *fileExtension = [extensionArray objectAtIndex:i]; 
    NSString *utiString = (__bridge NSString *)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension,(__bridge CFStringRef)fileExtension,NULL); 
    NSLog(@"Extension: %@ UTI:%@",fileExtension,utiString); 
} 
相關問題