Important Note: Developer can not do anything if application is in kill state or in background for a long time. So this can not be done.
There are many questions for your requirement:
1.1: How many days data
you have in one service, for a month
, for a year
or ?
1.2: Why not push
?
1.3: Why do you want to schedule local notification
on daily basis while you can schedule many at once?
1.4: There is no way to make changes in the app
when its not opened (killed by user) so you can not do anything in that case.
Now come to what we can do:
2.1: Considering you are getting monthly data. So you should schedule all the local notifications
at once in for loop
by increasing the day component
and setting the corresponding time (from your arrays by day index)
. And its your luck if user opens the application once in a month (90% chances he will) then you can request to server for next month data and do the same.
2.2: Why not this is being handled at server end and use push notifications
instead of local
. Server guys can configure a cron job for every minute which will fetch the all hours and minutes for users and will send the push
.
My suggestion not to go with local
but all maximum you can go with 2.1
(schedule all month notifications at once).