From the course: iOS and watchOS App Development: Notifications

Unlock the full course today

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

Code the snooze button

Code the snooze button

From the course: iOS and watchOS App Development: Notifications

Start my 1-month free trial

Code the snooze button

- [Instructor] You've done the simple like button The snooze button provides us with a few more techniques you need to know when making actions in the content extension. Buttons do not have notification information. You'll have to extract that if you take a look over here in the notification view controller again, the place we're going to get that is our did receive notification. I already set one up for content. But I want to set up one more for requests. So what we're going to do is go up here and I'm just going to do var request identifier equals and I'm just going to leave this a blank string. And then come down here to the did receive notification. I've got the full notification here. I'm going to just need that identifier to fire off a new notification. So what we're going to do here is I'm just going to do request identifier equals notification dot request dot identifier. I'm using the did receive notification to get these two and that will get me enough information for my…

Contents