You could try using UNTimeIntervalNotificationTrigger
instead. The range goes upto 10000 years.
From the Xcode documention here is an example.
// Fire in 30 minutes (60 seconds times 30)
let trigger = UNTimeIntervalNotificationTrigger(timeInterval: (30*60), repeats: false)
I believe that if you set repeat to true
then it would repeat at whatever time interval is set to (in the above case 30 * 60).
So you might need to set up two notifications - the first for the initial arbitary future date, and once that has passed a second notification for the repeating notification every 3 days.
A couple of things to note is that a user can at any time remove the permissions for notification, so you will have to handle that situation for both cases. Also you will need to cancel the notifications once the user acknowledges it.
also from the Xcode documentation (for init(timeInterval:repeats:)
)
If you specify true for the repeats parameter, you must explicitly remove the notification request to stop the delivery of the associated notification. Use the methods of UNUserNotificationCenter to remove notification requests that are no longer needed.
You may want to also have a look at these tutorials - Local Alerts Using UNNotificationCenter and Project 21: Local Notifications