I am trying to set up my app so that it will accept audio files dropped on to the application icon. I'm stuck at the first step - specifying the document types that I want to accept in my Info.plist.
As I understand it, I can use the UTI "public.audio" to avoid having to enumerate every single supported audio format. (I'm not concerned about backwards compatibility.) To this end, I've set up a document type in Xcode's target info window, like this:
Xcode has added the following to my Info.plist file:
Unfortunately this doesn't seem to work. I can't get my application to "darken" when I drag an audio file onto it. I have tried cleaning the project and rebuilding, but that doesn't help.
I'm sure I'm missing something very simple, but I have no idea what. Apple's documentation on the subject isn't very helpful - the UTI documentation is quite sparse, and the documentation for setting up document types doesn't show how to use UTIs.

As I understand it, I can use the UTI "public.audio" to avoid having to enumerate every single supported audio format. (I'm not concerned about backwards compatibility.) To this end, I've set up a document type in Xcode's target info window, like this:

Xcode has added the following to my Info.plist file:
Code:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>Audio</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSItemContentTypes</key>
<array>
<string>public.audio</string>
</array>
<key>LSTypeIsPackage</key>
<false/>
<key>NSPersistentStoreTypeKey</key>
<string>Binary</string>
</dict>
</array>
Unfortunately this doesn't seem to work. I can't get my application to "darken" when I drag an audio file onto it. I have tried cleaning the project and rebuilding, but that doesn't help.
I'm sure I'm missing something very simple, but I have no idea what. Apple's documentation on the subject isn't very helpful - the UTI documentation is quite sparse, and the documentation for setting up document types doesn't show how to use UTIs.