As we know limit of local notifications in ios 10 equals to 64. However app like water reminder requires a lot of notification per day and user can choose unique plan for each of the day. The problem is: lets say I have already stored 64 notifications (10 for monday, 8 for tuesday and etc., they are all scheduled as repeated weekly)
<UNCalendarNotificationTrigger: 0x6000008292e0;
dateComponents: <NSDateComponents: 0x600000352fe0>
Hour: 1
Minute: 3
Second: 0
Weekday: 6, repeats: YES>
(lldb) po trigger.nextTriggerDate()
▿ Optional<Date>
▿ some : 2017-06-01 22:03:00 +0000
- timeIntervalSinceReferenceDate : 518047380.0
However lets say today is Thursday and when I try to add notifications for weekday = 6 which is Friday I expect to see it scheduled. But in fact its not, I still have whole monday and tuesday scheduled but not friday and there is no any error to be printed and when count is less than 64 friday can be easily added.
So maybe I have wrong expectation but I thought that when I schedule new notification it should take away the oldest one which in our case are wednesday, tuesday or monday.
来源:https://stackoverflow.com/questions/44312909/ios-10-swift-3-add-more-than-64-local-notifications-does-not-keep-soonest