I have 5 daily notifications for my app. The times for each of these notifications changes daily. My question is there a way to set up 5 daily notifications, but adjust their times daily at midnight, or should I cancel all notifications daily and set a fresh 5 every midnight?
Also, where in my app do I schedule the notifications? This is the code I am referring to: UIApplication.sharedApplication().scheduleLocalNotification(notification)
All the samples I see are doing it in viewDidLoad in the view controller, but that would mean the user has to physically launch my app everyday for it to be scheduled. But what if the user doesn't launch my app for days, but expects my daily notifications to be the correct, adjusted time everyday? Do I do this in the AppDelegate file then or is there a better way?
Aucun commentaire:
Enregistrer un commentaire