Xcode4 如何将excel文件类型(xlsx)与iPhone应用程序关联
您好Xcode4 如何将excel文件类型(xlsx)与iPhone应用程序关联,xcode4,ios5,uti,Xcode4,Ios5,Uti,您好我已通过将文档类型添加到项目构建中,并将类型字段设置为“com.microsoft.excel.xls”(请参见屏幕截图),成功打开了邮件应用程序中的.xls文件。 我想对xlsx文件也这样做,但做不到。我试图添加“com.microsoft.excel.xlsx”,但没有成功 我通过如下定义自定义UTI解决了这个问题。尝试将这些定义添加到info.plist中。它按预期工作 <key>UTExportedTypeDeclarations</key> <arra
我已通过将文档类型添加到项目构建中,并将类型字段设置为“com.microsoft.excel.xls”(请参见屏幕截图),成功打开了邮件应用程序中的.xls文件。
我想对xlsx文件也这样做,但做不到。我试图添加“com.microsoft.excel.xlsx”,但没有成功
我通过如下定义自定义UTI解决了这个问题。尝试将这些定义添加到info.plist中。它按预期工作
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeDescription</key>
<string>XLSX input table document</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<string>xlsx</string>
<key>public.mime-type</key>
<string>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</string>
</dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeIdentifier</key>
<string>com.mydomain.myapplication.xlsx</string>
</dict>
</array>
UTExportedTypeDeclarations
UTTypeDescription
XLSX输入表文档
Uttypetag规范
public.filename-extension
xlsx
public.mime-type
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Uttypecommisto
公共数据
UTTypeIdentifier
com.mydomain.myapplication.xlsx
CbundleDocumentTypes
CbundleTypeName
XLSX输入表文档
伊斯汉德兰克
所有者
CbundleTypeRole
编辑
lsItemContentType
com.mydomain.myapplication.xlsx
XSLX已声明为org.openxmlformats.presentationml.presentation
XLSX文件的标识符是org.openxmlformats.spreadsheetml.sheet
结帐:我在这个问题上被绊住了!!!这是PPTX,而不是XLSX。即使你这样做,除非你在David的答案中添加自定义UTI,否则它也不起作用。我不知道为什么没有人投票支持你的答案,但它对我有效。谢谢
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>XLSX input table document</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
<array>
<string>com.mydomain.myapplication.xlsx</string>
</array>
</dict>
</array>