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.
Post
Replies
Boosts
Views
Activity
I am trying to use custom sound for local notification on Mac Catalyst. It is working correctly for iPhone/iPad using UNMutableNotificationContent but the same is not working for Mac Catalyst.
I have tried playing the custom sound using AVAudioPlayer and it plays correctly so I am assuming it is able to locate the file; the file is stored at Contents/Resources of the app directory. Also the sound file's duration is less than 30 seconds and is saved using .caf format.
Does Apple Silicon support code without automatic reference counting? I am facing EXC_BAD_ACCESS errors in my app while running on arm64 architecture which is otherwise running correctly when built using Rosetta for x86_64 architecture.
While migrating existing iOS app to Mac Catalyst, is there any alternative for On Demand Resources except for bundling the resources with the app?