如何让我的应用程序显示在“打开方式...”中iPad 中的弹出列表?

发布于 2024-11-16 05:29:40 字数 545 浏览 3 评论 0原文

可能的重复:
如何将文件类型与 iPhone 应用程序关联?< /a>

经过一番谷歌搜索后,我发现我要更改我的 plist 文件以包含“文档类型”--->每个位置有两个值的数组:文档类型名称、处理程序排名。

我这样做了,并编写了 public.pdf、public.png 等作为文档类型名称,并尝试了每个可用的处理程序等级。但是,当我在 iPad 上测试它时,我的应用程序仍然不会显示在“打开方式...”列表中。

谁能帮助我实现这一目标?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

汐鸠 2024-11-23 05:29:40

我没有测试过,但这对你有用吗?

另请参阅以下链接:http://developer.apple.com/library/ios/#documentation/FileManagement/Conceptual/understand_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>

和这个...

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

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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文