I am trying to make an app that will receive media files from the Mail app by using Long Press > Open in "My app"
I am having trouble associating the files types I want with my app. I am using the Uniform Type Identifiers Reference
This is what my info.plist looks like:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>mp3</string>
</array>
<key>CFBundleTypeName</key>
<string>MP3 Audio</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.mp3</string>
</array>
<key>LSTypeIsPackage</key>
<false/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>avi</string>
</array>
<key>CFBundleTypeName</key>
<string>AVI movie</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSItemContentTypes</key>
<array>
<string>public.avi</string>
<string>video/x-msvideo</string>
</array>
<key>LSTypeIsPackage</key>
<false/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>3gp</string>
</array>
<key>CFBundleTypeName</key>
<string>3GPP movie</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSItemContentTypes</key>
<array>
<string>public.3gpp</string>
<string>application/octet-stream</string>
</array>
<key>LSTypeIsPackage</key>
<false/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>mpg4</string>
<string>mp4</string>
<string>m4v</string>
</array>
<key>CFBundleTypeName</key>
<string>MPEG-4 content</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSItemContentTypes</key>
<array>
<string>public.mpeg-4</string>
<string>video/mp4</string>
<string>video/mp4v</string>
</array>
<key>LSTypeIsPackage</key>
<false/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>mov</string>
</array>
<key>CFBundleTypeName</key>
<string>QuickTime movie</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSItemContentTypes</key>
<array>
<string>com.apple.quicktime-movie</string>
<string>video/quicktime</string>
</array>
<key>LSTypeIsPackage</key>
<false/>
</dict>
</array>
Out of these, only Mp3 and AVI show the Open In "My app" option. I just get the "Save Video" option that adds the videos to my camera roll. What am I doing wrong?
The formats I want to associate are: AVI, 3GP, MP4, M4V, MOV.
I have also tried this. It works for MP3, WAV, AVI, FLV but still no go for 3GP, MP4, MOV, M4V
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>Audio</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
<array>
<string>public.audio</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Video</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
<array>
<string>public.movie</string>
</array>
</dict>
</array>