Creating an application that can open files of a given format
- by Brian Postow
I've got an app, written in Obj-C. The info.plist has a list of file types that the app can open. I'm pretty sure that this is working because when I try to drag a file of an unacceptable type, the app doesn't highlight, but when I drag a file of an acceptable type, it does highlight, and lets me drop.
When I drop, the app starts up, correctly, however, then I get a dialog saying:
The document "foo.tiff" could not be opened. DocView cannot open files in the "TIFF File" format.
I DO have this in my info.plist
<key>CFBundleTypeExtensions</key>
<array>
<string>tif</string>
<string>tiff</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>TIFFFile.icns</string>
<key>CFBundleTypeName</key>
<string>TIFF File</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>TIFF</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Documents/</string>
Thanks.