Custom UTI does not work for iMessage in iOS 10
Asked Answered
W

0

21

I defined and used a custom UTI type for my iOS app for iOS 9. Now, after using XCode 8 and iOS 10, I cannot "open" the file, if it is sent via iMessage. If I tap on the icon, nothing happens, although the correct icon is displayed. If it is sent via E-Mail, I can still import it to my app. Is there a difference for mail and iMessage?

My info.plist declarations look like this:

    <key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeIconFiles</key>
        <array>
            <string>Icon-60@3x</string>
        </array>
        <key>CFBundleTypeName</key>
        <string>My Voting Lists File</string>
        <key>CFBundleTypeRole</key>
        <string>Editor</string>
        <key>LSHandlerRank</key>
        <string>Owner</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.my-org.document.lists</string>
        </array>
    </dict>
</array>

and

<key>UTExportedTypeDeclarations</key>
<array>
    <dict>
        <key>UTTypeConformsTo</key>
        <array>
            <string>public.text</string>
            <string>public.data</string>
        </array>
        <key>UTTypeDescription</key>
        <string>My Voting List File</string>
        <key>UTTypeIdentifier</key>
        <string>com.my-org.document.lists</string>
        <key>UTTypeTagSpecification</key>
        <dict>
            <key>public.filename-extension</key>
            <array>
                <string>mylist</string>
            </array>
        </dict>
    </dict>
</array>

I also searched for a solution, but did not find something that works for me. This stackoverflow discussion did not help me :( Any ideas what changed or what my mistake is? Thanks in advance!

Washko answered 26/9, 2016 at 18:35 Comment(3)
For file import from email to my app functionality, It's working with iOS 9 but not working with iOS 10. Can you please tell me how you have achieved with email? What is the change between iOS 9 and iOS10 for this in code?Squadron
Did you ever find a solution to this problem? I am having the exact same issue except on top of all of that the icon in iMessage is incorrect and only shows as a folder.Schismatic
I tried it after a while again (new iOS version) and have no problem anymore. Cannot trace the root cause for the problem anymore. The code above works fine (for iMessage as well as Mail). Only difference: In mail, I can perform a "long tap" to open the "open in"-menu -- In iMessage, I have to open the file first by tapping it and then hit the "share"-button.Washko

© 2022 - 2024 — McMap. All rights reserved.