Hi there,
I've downloaded Xamarin.Mac "UserNotificationExample" (sorry the forum doesn't allow me to post links, but you can easily google it by "UserNotificationExample xamarin.mac") and trying to make it work.
The app starts fine, and if I press "Notify Me Please!!" (i.e. schedule notification) then DidDeliverNotification is raised as expected.
NSUserNotificationCenter center = NSUserNotificationCenter.DefaultUserNotificationCenter;
center.DidDeliverNotification += (s, e) =>
{
Console.WriteLine("Notification Delivered");
DeliveredColorWell.Color = NSColor.Green;
};
center.DidActivateNotification += (s, e) =>
{
Console.WriteLine("Notification Touched");
TouchedColorWell.Color = NSColor.Green;
};
center.ShouldPresentNotification = (c, n) => { return true; };
center.ScheduleNotification(not);
and I can see "Notification Delivered" line in Application Output window.
But, if I click on notification window itself then DidActivateNotification is NOT raised, so "Notification Touched" is NOT written into Application Output window.
What I am doing wrong?
My system is:
OS X El Capitan 10.11.6
Visual Studio Community 2017 for Mac 7.1.5 (build 2)
Xamarin.Mac Version: 3.6.3.3 (Visual Studio Community)
Any help would be greatly appreciated.
Thanks