How do I get my app to show up in the “Open In…” popover list in the iPad? [duplicate]

∥☆過路亽.° 提交于 2019-11-27 07:11:06

问题


Possible Duplicate:
How do I associate file types with an iPhone application?

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.

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?


回答1:


I have not tested, but does this work for you?

Also see the following link: http://developer.apple.com/library/ios/#documentation/FileManagement/Conceptual/understanding_utis/understand_utis_declare/understand_utis_declare.html

<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>

and this...

<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>


来源:https://stackoverflow.com/questions/6397052/how-do-i-get-my-app-to-show-up-in-the-open-in-popover-list-in-the-ipad

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!