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.

Pending notifications

Pending notifications

From the course: iOS and watchOS App Development: Notifications

Start my 1-month free trial

Pending notifications

- [Instructor] Once you add a notification to the notification center, you still have control over it. The UN notification center has methods for managing notifications. You'll find two states of notifications the first, pending notifications are from when the app adds a notification and when the notification displays. You can get pending notifications with the get pending notifications method of UN user notification center. We'll list the pending notification on the text view, which I have labeled console, in the manage section of our app. So go ahead and stop the app, head over to manage notificationcontroller.swift and go ahead and see if you can find the view pending notifications action. Like so, and we're going to add a line in here and we're going to use UN user notificationscenter dotCurrent And you'll see here there's something called the get pending notification requests and pick that up, that's got a closure. I'm going to press return to get the closure and it's got for…

Contents