LarsGvB
LarsGvB

Reputation: 297

How do I make my app show up in "open-in"-menu for plist-files in ios13?

I updated to iOS 13 and now my app won't show up in the new "Open In..."-dialogs anymore. I previously did the following to get my app to show up there, if the opened file was a .plist file:

  1. I edited the Info.plist like in the screenshot below.
  2. In the AppDelegate I use
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {}

to handle the given file.

Any ideas what could've changed or what I might have accidentally changed so that it isn't working anymore? As far as I know I followed the steps provided by Apple correctly.

Edit: Could it be that they changed something so that I have to do something different, because .plist is maybe a known filetype and not a custom one?

Edit 2: I discovered that it works if I change "plist" to something else. I tried replacing it with "test" and send a file called "abc.test" to my phone and it showed my app to open it.

Edit 3: In XML it looks like this:

<key>CFBundleDocumentTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeIconFiles</key>
            <array/>
            <key>CFBundleTypeName</key>
            <string>Plist File</string>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>LSHandlerRank</key>
            <string>Owner</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>rtm.plist</string>
            </array>
        </dict>
    </array>

<key>UTExportedTypeDeclarations</key>
    <array>
        <dict>
            <key>UTTypeConformsTo</key>
            <array>
                <string>public.data</string>
            </array>
            <key>UTTypeDescription</key>
            <string>Plist File</string>
            <key>UTTypeIconFiles</key>
            <array/>
            <key>UTTypeIdentifier</key>
            <string>rtm.plist</string>
            <key>UTTypeTagSpecification</key>
            <dict>
                <key>public.filename-extension</key>
                <array>
                    <string>plist</string>
                </array>
            </dict>
        </dict>
    </array>

Edit 4: If I just put "public.data" as the document type my app gets shown and my code works. But I only want it to be shown for plist-files.

Edit 5: I removed all Document Types and UTIs and just added "public.plist" as a Document Type and now it works. Seems that you can't use own UTIs with common file types anymore.

enter image description here

Upvotes: 5

Views: 1324

Answers (1)

vomi
vomi

Reputation: 1163

Ran into the same issue.

In my case the fix was --> change public.item to public.data.

And my app magically reappeared in the open-in menu.

Upvotes: 3

Related Questions