如何让我的应用程序显示在“打开方式...”中iPad中的popover列表? [英] How do I get my app to show up in the "Open In..." popover list in the iPad?
问题描述
可能重复:
如何将文件类型与iPhone应用程序相关联?
经过一些谷歌搜索后,我发现我要更改我的plist文件以包含文档类型--->每个点都有两个值的数组:文档类型名称,处理程序等级。
After some Googling, I found I was to change my plist file to include "Document Types" ---> an array with two values in each spot: Document Type Name, Handler Rank.
我做了这个并编写了public.pdf,public.png等...作为文档类型名称,我尝试了每个可用的处理程序等级。但是,当我在iPad上测试时,我的应用程序仍然不会显示在打开...列表中。
I did this and wrote public.pdf, public.png, etc... as the document type names and I tried every available handler rank. However, when I test it on the iPad, my app still will not display in the "Open in..." list.
任何人都可以帮助我实现这一目标吗?
Can anyone help me to achieve this?
推荐答案
我还没有测试过,但这对你有用吗?
I have not tested, but does this work for you?
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>pdf</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>app.icns</string>
<key>CFBundleTypeName</key>
<string>public.pdf</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.pdf</string>
</array>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>png</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>app.icns</string>
<key>CFBundleTypeName</key>
<string>public.png</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.png</string>
</array>
</dict>
</array>
此...
<key>UTImportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeIdentifier</key>
<string>public.pdf</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>com.apple.ostype</key>
<string>PDF</string>
<key>public.filename-extension</key>
<array>
<string>pdf</string>
</array>
<key>public.mime-type</key>
<string>application/pdf</string>
</dict>
</dict>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.image</string>
</array>
<key>UTTypeIdentifier</key>
<string>public.png</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>com.apple.ostype</key>
<string>PNG</string>
<key>public.filename-extension</key>
<array>
<string>png</string>
</array>
<key>public.mime-type</key>
<string>image/png</string>
</dict>
</dict>
</array>
这篇关于如何让我的应用程序显示在“打开方式...”中iPad中的popover列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!