My app needs to respond to Mount and Unmount events of removable volumes. What is the best class to use?
Try it. See what happens. Post the results.Is NSWorkspace a good choice?
Without knowing what you mean by "respond to", it's impossible to say what might be "best". If you have a specific action in mind, you'll have to say what that specific action is.
Try it. See what happens. Post the results.
In the absence of any information about what you're trying to accomplish, NSWorkspace seems like a good starting point to me. If you have specific reasons to think otherwise, or have encountered a specific problem, you'll have to post the reasons or the problems.
An SD card is inserted into a USB card reader by my customer or one of our admins. The server side of my app on a MBP or MacMini must see that insertion and respond by reading from (or writing to) the SD card.
NSWorkspace should be fine. Try it. See if it works.
One thought: if you have to write to the SD card, be prepared for it to fail. The SD might be write-protected, or it might be a read-only file-system.
Btw, did you see my new post about writing a command line app? All of the questions I've been posting relate to one company project.
You'll also need to learn about NSRunLoop, too. The mount/unmount notifications depend on an active run loop, IIRC (but I could be wrong about that).
If you've never dealt directly with an NSRunLoop before, I expect you will have trouble understanding it, especially in the context of a command-line tool. It's going to seem like dark magic until you figure it out. You should probably spend some time finding examples of NSRunLoop in command line tools.