如何在iPhone上使用应用程序打开电子邮件附件

时间:2019-02-28 10:40:23

标签: ios objective-c iphone xcode ipad

我正在尝试在应用程序中实现一项功能,该功能允许用户在应用程序内打开邮件附件。在这种情况下,我尝试使用jpegs图片进行操作。

根据我从apple documentation所读的内容,所要做的就是声明应用程序可以在 Document Types 词典中打开此类文件,但是当我运行该应用程序时在设备上查看我的应用程序是否可以作为打开文件的可行选项,但它没有出现。 我在plist中拥有的代码是:

<key>CFBundleDocumentTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeIconFiles</key>
            <array>
                <string>icon.png</string>
            </array>
            <key>CFBundleTypeName</key>
            <string>jpegs</string>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>LSHandlerRank</key>
            <string>Owner</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>public.jpeg</string> i also tried <string>public.image</string>
            </array>
        </dict>
    </array>

我的问题是,是否有一种新方法可以使该应用显示为打开邮件附件的可能选项?还是我丢失了某些东西?

0 个答案:

没有答案