How to repeat local notification each day starting from tomorrow

795 views Asked by At

I need to schedule local notifications which I'd like to repeat each day from lets say at 23:00. But I do not want to start from today but from tomorrow.

If I schedule them using UNCalendarNotificationTrigger:

var dateInfo = DateComponents()
dateInfo.hour = 23
dateInfo.minute = 0
dateInfo.second = 0
let trigger = UNCalendarNotificationTrigger(dateMatching: dateInfo, repeats: true)

then the notifications will be received each day at 23:00 but will get notification for today as well if the above code is executed before 23:00.

Is there any good way to achieve that or I just should schedule 64 (the iOS limit for undelivered local notifications) different local notifications with exact dates?

0

There are 0 answers