I'm fairly new to iOS coming from Android. I'm having a bit of a hard time understanding the whole file and mime association deal. It is kinda confusing... I have searched all over for samples and I simply got more confused.
Essentially to get me started I want to support opening m3u playlists from browser, emails, and file browsers... on my app. The following information is what generally is seen for the m3u playlist.
Uri scheme
file or http
Mime
audio/x-mpegurl, audio/mpeg-url, application/x-winamp-playlist, audio/scpls, audio/x-scpls
File extension
.m3u with potential query at the end such as .m3u?id=21312312
UPDATE 1
File association seem to be working partially. Currently, clicking on any of the stations from the IceCast directory, they are opened by the browser. However, if I email my self the playlist file the email app is able to provide me with the option to open the playlist on my app.
Here is my updated plist file.
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array/>
<key>CFBundleTypeName</key>
<string>Playlists</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSItemContentTypes</key>
<array>
<string>com.vblast.xiialive.playlist</string>
</array>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.url</string>
<string>public.file-url</string>
<string>public.filename-extension</string>
<string>public.mime-type</string>
</array>
<key>UTTypeDescription</key>
<string>Playlists</string>
<key>UTTypeIdentifier</key>
<string>com.vblast.xiialive.playlist</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>m3u</string>
<string>pls</string>
<string>asx</string>
</array>
<key>public.mime-type</key>
<array>
<string>audio/playlist</string>
<string>audio/mpegurl</string>
<string>audio/x-mpegurl</string>
<string>audio/m3u</string>
<string>x-winamp-playlist</string>
<string>application/x-winamp-playlist</string>
<string>audio/x-scpls</string>
<string>video/x-ms-asf</string>
</array>
</dict>
</dict>
</array>