无法使用我的应用程序打开电子邮件附件中的某些PowerPoint文件

时间:2014-09-02 07:18:39

标签: ios email share

我需要将所有文档,图片和视频从邮件附件共享到我的应用程序,但遗憾的是,某些文档在面板上共享时错过了我的应用程序。这是我的info.plist的文档类型。

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeName</key>
        <string>Microsoft PowerPoint</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.microsoft.powerpoint.​ppt</string>
                    <string>org.openxmlformats.presentationml.presentation</string>
        </array>
    </dict>
    <dict>
            <key>CFBundleTypeName</key>
            <string>OpenDocument Presentation</string>
            <key>LSHandlerRank</key>
            <string>Alternate</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>org.oasis.opendocument.presentation</string>
            </array>
        </dict>
    <dict>
        <key>CFBundleTypeName</key>
        <string>Microsoft Excel</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>org.openxmlformats.spreadsheetml.sheet</string>
            <string>com.microsoft.excel.xls</string>
        </array>
    </dict>
    <dict>
        <key>CFBundleTypeName</key>
        <string>Microsoft Word</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.microsoft.word.doc</string>
            <string>com.microsoft.word.wordml</string>
            <string>org.openxmlformats.wordprocessingml.document</string>
        </array>
    </dict>
    <dict>
            <key>CFBundleTypeName</key>
            <string>OpenDocument Text</string>
            <key>LSHandlerRank</key>
            <string>Alternate</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>org.oasis.opendocument.text</string>
            </array>
        </dict>
    <dict>
        <key>CFBundleTypeName</key>
        <string>PDF</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.adobe.pdf</string>
        </array>
    </dict>
    <dict>
        <key>CFBundleTypeName</key>
        <string>Audio</string>
        <key>CFBundleTypeRole</key>
        <string>Viewer</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>public.audio</string>
        </array>
    </dict>
    <dict>
        <key>CFBundleTypeName</key>
        <string>PDF</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.adobe.pdf</string>
        </array>
    </dict>
    <dict>
        <key>CFBundleTypeName</key>
        <string>Video</string>
        <key>CFBundleTypeRole</key>
        <string>Viewer</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>public.3gpp</string>
            <string>public.3gpp2</string>
            <string>public.mpeg-4</string>
            <string>public.avi</string>
            <string>com.apple.quicktime-movie</string>
            <string>public.mpeg</string>
            <string>public.movie</string>
            <string>public.video</string>
        </array>
    </dict>
    <dict>
        <key>CFBundleTypeExtensions</key>
        <array>
            <string>myapp image</string>
        </array>
        <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>
            <string>public.jpeg</string>
        </array>
    </dict>
</array>

例如,我无法分享this powerpoint

1 个答案:

答案 0 :(得分:0)

如果您只想让您的应用位于任何类型文件的列表中,您可以使用通用UTI public.data ...

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeIconFiles</key>
        <array/>
        <key>CFBundleTypeName</key>
        <string>Document</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>public.data</string>
        </array>
    </dict>
</array>