Mac notification center support

Does JUCE support mac "Notification Center [sic]"  messages? Does anyone have any example of code to do this? I had a quick look through the forum but I can't really see anything.


I'm talking about NSUserNotification notifications.

I can find information on using QT for this, if anyone (with more Obj-C experience) has tried these. (

You will need a bit of Objective-C. This works for me:

Class theClass = NSClassFromString(@"NSUserNotificationCenter");
if (theClass)
    NSUserNotification *notification = [[NSUserNotification alloc] init];
    NSString *title = (NSString*) trackRef->getColumnString(ITrackRef::colTitle).toCFString();
    [notification setTitle:title];
    [title release];
    String msg;
    msg << trackRef->getColumnString(ITrackRef::colArtist) << NewLine::getDefault();
    msg << trackRef->getColumnString(ITrackRef::colFeed);
    NSString *cfMsg = (NSString*) msg.toCFString();
    [notification setInformativeText:cfMsg];
    [cfMsg release];
    NSUserNotificationCenter *center = [NSUserNotificationCenter defaultUserNotificationCenter];
    [center deliverNotification:notification];
    [notification release];