Mime Type (or something) So iOS Mail Does Not Open

2020-07-17 04:37发布

问题:

I've been following the brilliant instructions in this answer, which work perfectly. However, my file type is mime "application/notforquicklook" and quicklook still tries to open it. This causes general gear spinning and nothing happening.

How can I get around this problem? My files are compressed plists. Before I was using full XML plists, which worked fine, but they are too big (with no advantage).

Is this a question of choosing the right MIME type, or something else?

回答1:

in fact, you should assign "public.data" to your "Conforms to UTIs" (UTTypeConformsTo) in "Exported Type UTIs" (CFBundleDocumentTypes)

<dict>
    <key>UTTypeConformsTo</key>
    <array>
        <string>public.data</string>
    </array>
    <key>UTTypeDescription</key>
    <string>Scrollshow Presentation</string>
    <key>UTTypeIdentifier</key>
    <string>com.plimse.scrollshow</string>
    <key>UTTypeTagSpecification</key>
    <dict>
        <key>public.filename-extension</key>
        <string>scrollshow</string>
        <key>public.mime-type</key>
        <string>mime/x-scrollshow</string>
    </dict>
</dict>


回答2:

This worked for me, remove this from the xxx-info.plist file:

<key>UTTypeConformsTo</key>
<array>
    <string>public.xml</string>
</array>

Now only my app shows up in the mail app.



标签: ios quicklook