Dan Wood: The Eponymous Weblog (Archives)

Dan Wood Dan Wood is co-owner of Karelia Software, creating programs for the Macintosh computer. He is the father of two kids, lives in the Bay Area of California USA, and prefers bicycles to cars. This site is his older weblog, which mostly covers geeky topics like Macs and Mac Programming. Go visit the current blog here.

Useful Tidbits and Egotistical Musings from Dan Wood

Categories: Business · Mac OS X · Cocoa Programming · General · All Categories

Thu, 17 May 2007

Adding support for new file types in your application

Recently somebody asked us why Sandvox didn't have support for MIDI files. I tried it out and sure enough, even though Quicktime knows how to play a MIDI file, I couldn't import one into Sandvox.

It turns out that MIDI files are not listed as one of the UTIs (uniform type identifiers) built into Mac OS X.

Sandvox uses UTIs to match file types, as much as possible (since there are some methods in Cocoa that still — as of Tiger — don't have UTI equivalents). So I was able to fix this problem without actually changing any code!

See more ...