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.
Steps for local notifications
From the course: iOS and watchOS App Development: Notifications
Steps for local notifications
- [Instructor] With permissions set up, we'll explore local notifications first. These notifications come from your app, calendar events, locations, timers, and other events are easily made into notifications. Before we build a notification, I want to show you the four parts of a local notification. Stop the app and head to the introNotificiation method at the bottom of ViewController. There are four parts to a notification. First of all, there's the content. This is usually text, but can be more. We'll discuss some of these other forms of content later. Second, is the trigger. This is the condition that will launch the notification. There are three triggers for local notifications, time intervals, date components, and location. Thirdly, we'll take the trigger and the content, and make a request. Finally, we'll schedule the request by adding it to the notification center. Once scheduled, it is no longer in the app, but handled by the notification center, which is a background task…
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)
Steps for local notifications1m 30s
-
(Locked)
Static notification content2m 18s
-
(Locked)
Dynamic notification content3m 44s
-
(Locked)
Time interval triggers2m 18s
-
Calendar notification triggers4m 26s
-
(Locked)
Notification requests5m 5s
-
(Locked)
Notification testing2m 2s
-
(Locked)
In-app notification4m 32s
-
(Locked)
-
-
-
-
-
-
-
-
-