From the course: iOS and watchOS App Development: Notifications

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Repeating notifications

Repeating notifications

From the course: iOS and watchOS App Development: Notifications

Start my 1-month free trial

Repeating notifications

- [Instructor] In the last video, I kept pressing Next Pizza Step. When you can remove notifications, you can fully use a feature of triggers, we haven't. You can make repeatable triggers. So go ahead and close this up, and I'm going to go to the View Controller and head over to makePizza, and let's go look at the trigger here. I'm going to make a copy of the trigger, the Command + C, Command + V. I'm going to comment out one of these, and I'm going to now change this one a little bit. We can change the repeat to true, and then we can change the timeInterval. Now, there's something important about this timeInterval. If you're using true, you can't have less than 60 seconds, otherwise, you'll get a fatal error. So, the lowest timeInterval you got is 60 seconds. So this will be what we set it for. If you go ahead and run this now, you can make a pizza, go to Manage Notifications, view the Pending, and you'll see the pizza there. And you can keep hitting Pending to see the time move on…

Contents