Cocoa touch 内容类型/UTI在应用程序中打开CSV
如何写入.plist文件的CbundleDocumentTypes属性,以允许应用程序显示在其他应用程序的“在中打开…”对话框中 那是我的,但不起作用Cocoa touch 内容类型/UTI在应用程序中打开CSV,cocoa-touch,csv,plist,uti,Cocoa Touch,Csv,Plist,Uti,如何写入.plist文件的CbundleDocumentTypes属性,以允许应用程序显示在其他应用程序的“在中打开…”对话框中 那是我的,但不起作用 <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeIconFiles</key> <array/> <key>CFB
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array/>
<key>CFBundleTypeName</key>
<string>Readings</string>
<key>LSItemContentTypes</key>
<array>
<string>text.csv</string>
</array>
</dict>
</array>
CbundleDocumentTypes
CbundleTypeConfigiles
CbundleTypeName
读物
lsItemContentType
text.csv
<代码> > p>发现:<代码>公共。逗号分隔值文本< /代码> 请考虑Apple提供的通用UTI(图1-2)。在您的情况下,public.text应该足够了,但是如果您想处理例如.doc和.docx文件,您可能会对public.composite-content感兴趣
您的代码可能被修改如下
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>Readings</string>
<key>LSItemContentTypes</key>
<array>
<string>public.text</string>
<string>public.html</string>
</array>
</dict>
</array>
CbundleDocumentTypes
CbundleTypeName
读物
lsItemContentType
public.text
public.html
Apple的常数是kUTTypeCommaSeparatedText
。