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
From the course: iOS and watchOS App Development: Notifications
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Pending notifications3m 57s
-
Unique identifiers3m 41s
-
(Locked)
Delivered notifications4m 7s
-
(Locked)
Update notification content5m 45s
-
(Locked)
Update pending notifications4m 5s
-
(Locked)
Remove notifications3m 55s
-
(Locked)
Repeating notifications5m 31s
-
(Locked)
Remove all notifications2m 23s
-
(Locked)
Custom group notifications4m 59s
-
(Locked)
-
-
-
-
-
-
-
-