I cannot find any Apple documentation for this exact scenario, and I tried various ways to do this, and I keep going empty.
I would like to schedule a re-notification ( iOS 10+
so UNCalendarNotificationTrigger
or equivalent).
These are local alerts, not push notifications.
My goal:
Schedule of notifications repeating:
- once every two weeks (for example, every second Tuesday)
- once a quarter (e.g. 1 out of every 3 months )
My current approach:
These triggers work well and are easy to implement (running Swift Playground code).
But...
I cannot force a fortnightly
or quarterly
trigger to function correctly.
So, to be clear, my questions are:
- Can I get a notification that repeats every two weeks?
- How do we get a trigger for a quarter?
Since DateComponents()
has a quarter
block, I assume a quarterly
trigger is possible. However, for a one-week reminder, I'm not even sure that this is possible ...
Any insight would be appreciated!
source share