0

There seem to be some valid use-cases for Local Notifications that aren't possible with UNNotificationRequest and it's associated triggers: UNTimeIntervalNotificationTrigger and UNCalendarNotificationTrigger.

For example, I'd like to send a local notification every 12 hours, but not start the notifications for another 5 days and have it stop after 100 days. Yet, there does not seem to be a startDate/endDate property for either the triggers or the UNNotificationRequest

Of course, one option is to use UNCalendarNotificationTrigger and explicitly schedule each one, but this will run into the total-notification-limit of 64.

Does iOS have notification scheduling capabilities that can (or perhaps cannot) be accessed for this purpose?

Thanks

paiego
  • 3,619
  • 34
  • 43
  • 1
    No, it doesn’t. I suggest filing an enhancement request with Apple. – matt Mar 20 '20 at 18:51
  • @matt. We actually already submitted a request, but have heard nothing back! Do you have any thoughts on a work-around until this feature requested is implemented? For example, we can use explicit calendar requests as long as our app can be run at set intervals. Is there a way to register an app to be "awakened" at set intervals? – paiego Mar 20 '20 at 19:03
  • 1
    That’s indeed the problem. Obviously your app can modify the list of scheduled notifications but not if the user doesn’t run your app. The only way to arrange for your app to be awakened like that is with stuff like background app refresh (if the user permits it) or remote notifications, which is probably a lot more than you bargained for. – matt Mar 20 '20 at 19:07
  • However you can at least configure your notifications so that you are notified when the user cancels them. See on `.customDismissAction`. But even this won’t help in all situations, I believe. Local notifications go to the user, not to you. – matt Mar 20 '20 at 19:09
  • @matt. I'm certainly willing to use remote Background Notifications to solve this issue (i.e. wake up the app and reschedule new local notifications). However, as I've read, Background Notifications don't wake up the app if it's been force-quit. Is this your understanding? – paiego Mar 24 '20 at 18:00

0 Answers0