I had a bookmark which described the process on how to do this - finding the name of a mounted CD in OS X - but I deleted the bookmark when I reformatted my Mac. :P
Reading up on the subject, this is what I think might work. Basically, I need to verify if a particular CD is mounted before continuing in the application
- Access NSWorkspace
- Perform 'checkForRemovableMedia'
- Grab array of mounted media paths from 'mountedRemoveableMedia'
- Run through array of mounted media paths to find one containing name of targeted disc
Anyway, this is what I've came up with as a possible solution. Anyone else have any other ideas/knowledge in this area in Cocoa? Suggestions :)
EDIT: I made this code below, but isn't working. It creates an NSCFArray which contains NSCFStrings, which I read up and shouldn't be doing.
NSArray *mountedItems = [[NSWorkspace sharedWorkspace] mountedRemovableMedia];
int count = [mountedItems count];
int i = 0;
for (i = 0; i < count; i++) {
//line is not printing. contains NSCFArray and NSCFStrings
[NSLog print:[[mountedItems objectAtIndex:i] stringValue]];
}