I am working on an alarm app project(Click for GitHub link) this code is working fine but the problem is notifications are limited to approximately 64 at the time so I am unable to send continues notification until the user responds to the notification. I read some the apple restricts local notification to only 64 but I have seen many apps on apple store those are sending notification continuously here few links from the apple store.
https://itunes.apple.com/us/app/red-clock-free-edition-the-minimal-alarm-clock/id567374573?mt=8 https://itunes.apple.com/us/app/alarmy-alarm-clock/id1163786766?mt=8
Anyone help to understand how this app is able to send continuously and I tried these apps are sending notification until the user responds to the app (for more than 1 hr I checked). Below is the code for setting single notification.
let comingSunday = findNext("Sunday", afterDate: fireDate.adding(minutes: item))
let triggerDate = Calendar.current.dateComponents([ .year, .month, .weekday, .hour, .minute, .second], from: comingSunday!)
let trigger = UNCalendarNotificationTrigger(dateMatching: triggerDate, repeats: alarm.repeatAlarm)
let request = UNNotificationRequest(identifier: "\(alarm.uuid)0\(item)", content: notificationContent, trigger: trigger)
UNUserNotificationCenter.current().add(request) { (error) in
if let error = error {
print("Unable to add notification request, \(error.localizedDescription)")
}
}
Video of Alarmy app with continuous notification
Please install and run app from App Store and notice how notification are working in above apps before posting answer
The Delegate only works when the app is running