Skip to content

Instantly share code, notes, and snippets.

@kellymredd
Created July 17, 2011 16:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kellymredd/1087747 to your computer and use it in GitHub Desktop.
Save kellymredd/1087747 to your computer and use it in GitHub Desktop.
specify file types with your app
/*
This goes in your Info.plist
it's been a while since I added this functionality so I'm not sure what was added and what was already there, you may already have some pieces of the code.
When you tap and hold a mail attachment your app will show up in the list of associated apps and switch to your app when selected.
*/
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>YOUR APPLICATION ID</string>
<key>CFBundleURLSchemes</key>
<array>
<string>YOUR APP NAME</string>
</array>
</dict>
</array>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array>
<string>YOUR ICON FILES</string>
<string>YOUR ICON FILES</string>
</array>
<key>CFBundleTypeName</key>
<string>Songwriter Files</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>public.plain-text</string>
<string>com.microsoft.waveform-audio</string>
<string>org.gnu.gnu-zip-archive</string>
</array>
</dict>
</array>
<key>CFBundleIdentifier</key>
<string>YOUR APPLICATION ID</string>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment