Re-scheduling local notifications on a daily basis - swift

I'm working on an application notifying Muslims at prayer time. Every day, five different notifications need to be set, notifying the users it's time to pray.
I was able to schedule notifications for one day, but how can I set them every day again? The 5 times need to be changed every day without user interaction or having to open the app.
Is there some kind of callback when the last notification fires, so I can setup notifications for the next day?

One way is to schedule notifications for a week (5*7) if you can get their times correctly , on the basis of that the user may open your app at least once/week
Other way is to make use of background fetch capability where IOS wakes your app to run at any time On the assumption that you re-schedule them for a week from the launch time

Related

count down in flutter( not depending on device time)

I'm building a flutter app where I want to restrict some of the users for a week and also show them the remaining time in days and hours so when the apps get close the timer should never get stopped. and also the date and time should not depend on the device time (if they change device time it should not affect the countdown)

How to reschedule a notification starting from a specific date in Flutter Local Notifications?

I have recently been working on a new project which involves the package Flutter Local Notifications. Everything works smoothly except for one issue. My project involves a daily notification that alerts the user to open the app to check something off for that day. The issue is that when a user checks off the box prior to the time of the notification, the notification still shows up, which is not ideal for my project.
I am currently using zonedSchedule with
matchDateTimeComponents: DateTimeComponents.time
and trying rescheduling a notification after the user checks the box before the time the notification is supposed to show, however, this just schedules it for the same time again. I want to reschedule the notification and "ignore" or exclude the notification from that day and reschedule it for the next. I have already tried to use WorkManager to schedule the rescheduling of the notification after the time it is supposed to go off, but this is not working properly on all devices in the background. How should I go about accomplishing this task?
Thank you in advance for the help!

Increase variable if one week has passed swift

So like I want to allow my app to check if one week has passed, and if that is true, Increase a certain variable, while at the same time, checking if the user has opened the app in that one week. If the user hasn't opened the app in the one week that passed, the app sends a notification to the user to open the app.
I've thought of using NSTImer to do this but I'm worried that the timer would stop when the user closes the app
Is there a way for an iOS app to keep track of real-time without using NSTimer?
These are different issues:
if one week has passed, and if that is true, Increase a certain variable
Store a UserDefault with the starting date. When you launch, check the value. And observe significantTimeChangeNotification to see date changes while the app is running. In either case, if a week has passed, update your variable and the UserDefault.
If the user hasn't opened the app in the one week that passed, the app sends a notification to the user to open the app.
Completely separate issue. This is done by scheduling a LocalNotification periodically for 1 week in the future. Periodically (i.e. during app launch and significantTimeChangeNotification) reschedule it. When it fires, it will show your alert.

Run method as time updates

I am making an app that tells users the time until the next bus comes. As the time changes it will be different to the time that was registered in viewDidLoad. How can I constantly update the time?

UILocalNotification on the due date, weekly and monthly report

I am trying to work out the best way to use local notification in background to run a method to display a notification message from core data, based on due date or upcoming weekly and monthly summary report.
There are two options which I have worked out which is NSTimer and UILocalNotification.
With NSTimer i can run scheduledTimerWithTimeInterval every 24 hours in background to check core data before display local Notification to see if it is on due date, weekly or monthly report. I am not sure if this is best solutions or recommendation?
I have read other posts, they suggestion to use UILocalNotification instead. But they are only limited to 64 notifications per app. Thats ok if I use weekly and monthly which total 64 notifications but it won't work after 1 year unless user active the app also I need to display due date's on the day message as well.
I am thinking maybe after a local notification displayed then the app still in background set new next schedule local notification, but I couldn't work this one out so not sure if this is possible?
Any suggestions on this? Thank you in advance.