My problem:
I'm trying to send growl notifications that can be clicked on in order to focus on the source of the notification in my app. The growlNotificationWasClicked: message never gets sent to my delegate, even though I notify with a non-nil clickContext.
Details:
My app registers with Growl via the .growlRegDict plist method. The contents of the file:
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>AllNotifications</key>
<array>
<string>MessageNotification</string>
</array>
<key>DefaultNotifications</key>
<array>
<string>MessageNotification</string>
</array>
<key>TicketVersion</key>
<integer>1</integer>
</dict>
</plist>
In my application's applicationDidFinishLaunching: function, I have the following code:
[GrowlApplicationBridge setGrowlDelegate:(id <GrowlApplicationBridgeDelegate>)self];
In my AppDelegate file, I've declared a delegate function:
- (void)growlNotificationWasClicked:(id)clickContext {
NSLog(@"GOT GROWL NOTIF CLICK: %@", clickContext);
}
At some point in my app, I'm calling (with a non-nil context of type NSDictionary):
[GrowlApplicationBridge notifyWithTitle:title
description:body
notificationName:@"MessageNotification"
iconData:nil
priority:0
isSticky:NO
clickContext:context];
This displays a Growl notification as expected. However, when I click on the notification, my AppDelegate's growlNotificationWasClicked: method doesn't get called. As far as I can tell, there are no other settings required to handle clicks on notifications. Is there something that I'm missing?