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

时间:2021-06-30 13:04:42

I need to share all document, image and video from mail attachment to my app, but unfortunately some document where missing my app from share on panel. Here it is my info.plist's document type.

我需要将所有文档,图像和视频从邮件附件共享到我的应用程序,但不幸的是,某些文档在面板上共享时错过了我的应用程序。这是我的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>

For example i can't share this powerpoint

例如,我不能分享这个powerpoint

1 个解决方案

#1


0  

If you just want your app to be on the list for any type of file, you can use the generic UTI public.data...

如果您只想让您的应用程序位于任何类型文件的列表中,您可以使用通用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>

#1


0  

If you just want your app to be on the list for any type of file, you can use the generic UTI public.data...

如果您只想让您的应用程序位于任何类型文件的列表中,您可以使用通用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>