4

Is it possible to schedule a repeating local notification in the future? I'm trying to set up a repeating notification every 10 min starting in 30 min for example. (iOS 11 Swift)

I've tried using UNTimeIntervalNotificationTrigger but I'm not sure how to set when it should start. From what I've found the trigger fires as soon as it's added it to UNUserNotificationCenter.

Since the user might close the app I don't think I can first create a single notification then wait until that triggers to set up a repeating one.

I've looked at this: Repeating local notification is triggered immediately -- how to defer? And this: iOS 11- User local notification which repeat every x minutes And this: UserNotification in 3 days then repeat every day/hour - iOS 10

So no one seems to have figured it out.

(I don't want it to repeat every day or weekly or on a specific day.)

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
  • _"But I'm looking for local notifications."_ All the questions you linked **are** local notifications. – jscs Nov 27 '17 at 21:55
  • 1
    What you are looking for does not seem to be possible with the new notification APIs; you cannot combine a calendar trigger with an interval trigger. You could use the deprecated APIs where this is possible; although deprecated they will still work. – Paulw11 Nov 27 '17 at 22:24
  • Your notification center delegate gets some execution time when the user interacts with a notification, even if it's to dismiss. Can you use that, when the user hits the first one, to schedule the rest? They could ignore or miss it, of course. – jscs Nov 29 '17 at 00:52
  • @JoshCaswell For the type of app I'm building the user won't want to interact with the notification. Thanks for the workaround idea though! – user5539842 Nov 29 '17 at 22:45

0 Answers0