iosxcodeuidocumentinteraction

registering file types supported by an application to open files from other apps


I want my app to be able to copy files (images, videos, etc..) from other applications throughout iOS, after looking through apples documentation and some online sources I still haven't been able to get it to work. I have attached an image of what my info plist looks like.

enter image description here

here is the plist code for that section:

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeName</key>
        <string>All Files</string>
        <key>CFBundleTypeRole</key>
        <string>Editor</string>
        <key>LSHandlerRank</key>
        <string>Owner</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>public.data</string>
            <string>public.content</string>
        </array>
    </dict>
</array>

Solution

  • Registering file types will help if you want iOS to open your app when someone clicks an email attachment with a file extension which you are claiming for your app.

    But I think what you want is to be able to share a file from another app to your app. You need to create an app extension of type "Share".