UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

SOLVED: Local Notification with the content derived at the time the notification is triggered not when the code is compiled.

Forums > SwiftUI

Hi,

First of all many thanks to Paul for his deligence in clarification SwiftUI.

Secondly, many thanks for his great video how to do motivational application, where local notifications are used.

Which leads me to last, third point here. How to do this motivational application but with the content derived at the time the notification is triggered not at the time the code is compiled? In other words I'd like to send the thotification at 8pm every day with thecontent taken from the server at that exact time.

Many thanks for all suggestions,

K

3      

As my understanding from reading about local notifications is you can't change the content of a local notification once it's scheduled.

3      

Hmmm, OK,

What might be the best way forward then?

  1. Using Timer to schedule the notification? or

  2. Looking towards remote notifications?

K

3      

As far as I know a Timer wouldn't run when your app doesn't run. So remote notifications is the way to go.

3      

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.