Local Notification with repeat in Mac Catalyst

I am trying to set local notification with repeat on Mac Catalyst. It is triggering at the correct time but once triggered the notification keeps firing non-stop (only way to stop firing is to remove pending notification via code)

The code I'm using(some parts excluded for clarity):

NSDateComponents *dateComponents = [NSDateComponents new];
  dateComponents.weekday = FRIDAY; 
  dateComponents.hour = 10;
  dateComponents.minute = 30;
  dateComponents.second = 0;

UNCalendarNotificationTrigger *trigger =[UNCalendarNotificationTrigger triggerWithDateMatchingComponents:dateComponents repeats:YES];

UNNotificationRequest *request = [UNNotificationRequest requestWithIdentifier:key content:content trigger:trigger];

[[UNUserNotificationCenter currentNotificationCenter] addNotificationRequest:request withCompletionHandler:nil];

This code is working correctly on iOS devices.

I'm not sure I understand; that's the way it's supposed to work?

See the docs for init(dateMatching:repeats:):

Discussion

If you specify true for the repeats parameter, you must explicitly remove the notification request to stop the delivery of the associated notification. Use the methods of UNUserNotificationCenter to remove notification requests that are no longer needed.

So in response to, say, some user action you have to remove the notification yourself.

Local Notification with repeat in Mac Catalyst
 
 
Q