I\'m working on a prayers application that enables users to set an alarm(local notification) for prayer times, i.e. the user sets the application to notify him for Fajr pray
There are three ways to do this:
Use push notifications instead of local notifications and move the logic to the server. Problem - user won't get notifications when offline.
Keep using local notifications. You will have to plan a new notification for every prayer time. Of course, the number of local notifications is limited (max 64 scheduled notifications) but it should be enough for a week of notifications. A notification is not an alarm, the user is supposed to open the application in response to receiving a notification. That way, you can always reschedule all notifications when the app is reopened. Also, the last notification can be something similar to "you have not opened the app in a while, you won't be receiving more notifications".
Instead of creating local notifications, create alarms/reminders in your device calendar (Event Kit)