Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Shedule Local Notification After Local Notification Was shown

Hello!

In Swift I want to do the following: i want to Show a local Notification. Then when the Notification is shown i want to Change the properties of the local notifications to shedule another Message at a later time. I Understand how i can shedule a Notification but i dont know how I can change Settings when the app rund in the background. Is there a completion handler for local notifications?

The goal is to send random quotes at random time intervals.

Think You for your help!! Best Tobi

2 Answers

It is not possible without the use of remote notifications. The closest Solution is to use Daily or Hourly notifications that Update via background Fletch to get a somewhat Dynamic and consistent Flow of notifications.

I'm unsure on how to do this, but I'd like to see the answer. I think the only possible way would be for the app to possibly que say the next 24 hours worth of notifications each time it opens rather than in the background?

I found a method -> didReceiveLocalNotification and hopped that upping something i there would help. But it is not :/. Maybe I am just doing it right.